Skip to content

PHP 8.1 compatibility #13

Open
Open
@ca-dsgn

Description

@ca-dsgn

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions