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

Fix PHP 8.1 deprecation #110

Closed
wants to merge 1 commit into from

Conversation

jmsche
Copy link

@jmsche jmsche commented Jan 20, 2022

Hi,

This fixes a minor deprecation in 4.3 branch for PHP 8.1.

Without this here is the risen deprecation:

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated

@codemasher
Copy link
Member

Hey, this has already been fixed in #97, it's not tagged yet though.

@codemasher codemasher closed this Jan 20, 2022
@jmsche
Copy link
Author

jmsche commented Jan 21, 2022

Hi, sorry, didn't see it :) Could you please create a tag so it's available? Thanks!

@jmsche jmsche deleted the fix-php-8.1-deprecation branch January 21, 2022 07:41
@codemasher
Copy link
Member

I will as soon:tm: as i'm done with the v5 branch as there are a bunch of things i want to backport to 4.x. In the meantime I'd advise to manually set QROptions::$dataModeOverride = '' or suppress E_DEPRECATED.

@menjilx
Copy link

menjilx commented Feb 28, 2022

Hi,

This fixes a minor deprecation in 4.3 branch for PHP 8.1.

Without this here is the risen deprecation:

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated

How to fix this issue manually, currently using v4.3. Thank you

@codemasher
Copy link
Member

The answer is in the post before yours.

@menjilx
Copy link

menjilx commented Feb 28, 2022

The answer is in the post before yours.

added already and it is now fixed.
Thank you!
image

@codemasher
Copy link
Member

@menjilx Your fix won't do anything because you always set the value of $dataModeOverride to '' now, like, it can't even be changed if you wanted to because $interface will now always yield null. Just set it to an empty string wherever you invoke the QROptions instance.

@menjilx
Copy link

menjilx commented Feb 28, 2022

@menjilx Your fix won't do anything because you always set the value of $dataModeOverride to '' now, like, it can't even be changed if you wanted to because $interface will now always yield null. Just set it to an empty string wherever you invoke the QROptions instance.

thanks for checking my response, also updated it and placed it on the "options" already.
image

@codemasher
Copy link
Member

I have tagged the fix now as a release as i currently don't have time for the other things i've planned. It's available as 4.3.3.

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

Successfully merging this pull request may close these issues.

None yet

3 participants