Skip to content

PHP 8.4 compatibility issue with null args #270

@tehmaestro

Description

@tehmaestro

Hi, with PHP 8.4 having deprecated null parameters for builtin functions like mb_strlen, the following code crashes if a null value is sent:

// Connection.php
        $command = '*' . count($params) . "\r\n";
        foreach ($params as $arg) {
            $command .= '$' . mb_strlen($arg, '8bit') . "\r\n" . $arg . "\r\n";
        }

I assume we should continue accepting null values and just check for mb_strlen($arg ?? '', '8bit')
What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions