Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncertain exception !!! Unstable, not sure which URIs are allowed to render !!! Or Design flaws ? #151

Open
wheakerd opened this issue Sep 4, 2024 · 3 comments

Comments

@wheakerd
Copy link

wheakerd commented Sep 4, 2024

system: Fedora Linux 40 (Workstation Edition)
php version: 8.3.7

$qrCode = QrCode::create($uri)
            ->setEncoding(
                new Encoding('UTF-8')
            )->setErrorCorrectionLevel(ErrorCorrectionLevel::Low)
            ->setSize(300)
            ->setMargin(10)
            ->setRoundBlockSizeMode(RoundBlockSizeMode::Margin)
            ->setForegroundColor(
                new Color(0, 0, 0)
            )
            ->setBackgroundColor(
                new Color(255, 255, 255)
            );

        $result = $writer->write($qrCode);

        try {
            $writer->validateResult($result, $uri);
        } catch (ValidationException $e) {
            var_dump($e->getMessage());
            return false;
        }

       return $result->getString();

string(179) "The validation reader read "" instead of "http://192.168.0.188:9504/app/index/invitation_register?code=1234". Adjust your parameters to increase readability or disable validation."

but use "http://192.168.0.188:9504/app/index/invitation_register?code=123",no exception!
but use "http://192.168.0.188:9504/app/index/invitation_register?code=1235",no exception!
but use "http://192.168.0.188:9504/app/index/invitation_register?code=12345",no exception!

the excrption, only "http://192.168.0.188:9504/app/index/invitation_register?code=1234" !!!

@wheakerd
Copy link
Author

wheakerd commented Sep 4, 2024

Currently, we only find that this URL cannot be rendered, or there may be more possibilities?

@wheakerd
Copy link
Author

wheakerd commented Sep 4, 2024

It's still able to render, it just throws an exception?!

@wheakerd
Copy link
Author

wheakerd commented Sep 4, 2024

"khanamiryan/qrcode-detector-decoder": "^2.0"
"spomky-labs/aes-key-wrap": "^7.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant