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 8.1 compatibility #13

Open
ca-dsgn opened this issue Aug 24, 2022 · 0 comments
Open

PHP 8.1 compatibility #13

ca-dsgn opened this issue Aug 24, 2022 · 0 comments

Comments

@ca-dsgn
Copy link

ca-dsgn commented Aug 24, 2022

Hi,

I just figured out that if running under PHP 8.1 your code isn't runnable yet:

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /vendor/jaeger/phpquery-single/phpQuery.php on line 192

On line 192 you are passing $contentType (which is null by default) - so there need to be a check, wether it is null or not.

$this->contentType = strtolower($contentType);

The fix could be like this:

$this->contentType = strtolower(isset($contentType) ? $contentType : "");

Could you update your code at this part? I have seen that it gets auto-updated at packagist :-)

Thank you very much!

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