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

PHP coding issues #67

Open
liedekef opened this issue Jan 25, 2019 · 0 comments
Open

PHP coding issues #67

liedekef opened this issue Jan 25, 2019 · 0 comments

Comments

@liedekef
Copy link

Some issues with the code:

  1. To avoid a pass-by-reference warning in php 7, in the function addData the case-statement should be something like this (the "new" as a separate call):
        case QR_MODE_NUMBER :
	    $d = new QRNumber($data);
            $this->addDataImpl($d);
            break;

        case QR_MODE_ALPHA_NUM :
	    $d = new QRAlphaNum($data);
            $this->addDataImpl($d);
            break;

        case QR_MODE_8BIT_BYTE :
	    $d = new QR8BitByte($data);
            $this->addDataImpl($d);
            break;

        case QR_MODE_KANJI :
	    $d = new QRKanji($data);
            $this->addDataImpl($d);
            break;
  1. When coding a string like https://my.url.site/events/?eme_check_attendance=1&eme_pmt_rndid=5c4ac78bdaef8_8a5fe7041234573e19e7f9db6ba4fe38
    I got an error:
    PHP Fatal error: code length overflow. (988]72) in qrcode.php on line 362
    (I find the 988 very weird, and the 72 very small). I use this as a call:
    $qr = QRCode::getMinimumQRCode($my_example_url,QR_ERROR_CORRECT_LEVEL_H);
    Is this a bug?
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