improve error logs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello.

What is the best way to make a suggestion for future versions of PHP?

1) log report:

[31-Aug-2023 17:40:03 Pacific/Auckland] PHP Notice:  Array to string conversion in /PATHNAME/cron/V06_dostats.inc.php on line 102
[31-Aug-2023 17:40:03 Pacific/Auckland] AB is NOT an array
[31-Aug-2023 17:40:03 Pacific/Auckland] R is NOT an array
[31-Aug-2023 17:40:03 Pacific/Auckland] S is NOT an array
[31-Aug-2023 17:40:03 Pacific/Auckland] AB is NOT an array
[31-Aug-2023 17:40:03 Pacific/Auckland] R is NOT an array
[31-Aug-2023 17:40:03 Pacific/Auckland] S is NOT an array
[31-Aug-2023 17:40:03 Pacific/Auckland] AB is NOT an array
[31-Aug-2023 17:40:03 Pacific/Auckland] R is NOT an array
[31-Aug-2023 17:40:03 Pacific/Auckland] S is NOT an array

2) lines:

if(is_array($ab)){error_log('AB is an array');}
if(! is_array($ab)){error_log('AB is NOT an array');}

if(is_array($r)){error_log('R is an array');}
if(! is_array($r)){error_log('R is NOT an array');}
if(is_array($s)){error_log('S is an array');}
if(! is_array($s)){error_log('S is NOT an array');}

    $text.="REGION: $ab, $r, $s\n"; <<< This is line 102..  

SUGGESTION: Can the error message tell us which variable is the problem "array" ?  



--

Gordon.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux