phpQuery-single
phpQuery-single copied to clipboard
PHP 8.1 compatibility
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!