[php-src] Issue #11365: Error error for strlen(): Passing null to parameter when zero-length parameter exists
| From: | jabcreations | Date: | Sat, 03 Jun 2023 19:23:04 +0000 |
| Subject: | [php-src] Issue #11365: Error error for strlen(): Passing null to parameter when zero-length parameter exists | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244593@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11365
Author: jabcreations
### Description
$query1 = "SELECT name, optional FROM table;";
$result1 = mysqli_query($db, $query1);
if ($result1)
{
$row13 = mysqli_fetch_assoc($result1);
print_r($row3);
/*
Returns:
[name] => 'Jacob'
[optional] => ''
*/
}
Previously strlen() would correctly return 0 for 0 length arrays. Now it is incorrectly spawning
error messages about the string being null; a zero length array value is not null, it is 0 length!
Please fix this issue by returning it to the correct behavior!
### PHP Version
PHP 8.2.5
### Operating System
Windows 10 x64