[php-src] Issue #9198: Uninformative error message in the count() function

From: Date: Fri, 29 Jul 2022 21:22:02 +0000
Subject: [php-src] Issue #9198: Uninformative error message in the count() function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242075@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9198 Author: rigin ### Description The following code: ```php <?php count($not_array); ``` Resulted in this output: ``` A message is issued without specifying the location of the error: 0 count(): Argument #1 ($value) must be of type Countable|array, bool given ``` But I expected this output instead: ``` When switching to version 7.4, the following warning is issued. Warning : count(): Parameter must be an array or an object that implements Countable in /home/Rigin/web/gaz.rigin.net/public_html/components/com_cabinet/router.php on line 150 ``` ### PHP Version PHP 8.0 - 8.1 ### Operating System Ubuntu 18.04

« previous php.bugs (#242075) next »