Bug #75730 [Fbk->Nab]: Stuck on is_null()

From: Date: Tue, 26 Dec 2017 10:55:09 +0000
Subject: Bug #75730 [Fbk->Nab]: Stuck on is_null()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213274@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75730&edit=1 ID: 75730 Updated by: cmb@php.net Reported by: momchil at bojinov dot info Summary: Stuck on is_null() -Status: Feedback +Status: Not a bug Type: Bug Package: Scripting Engine problem Operating System: Windows 10 PHP Version: 7.1.12 Assigned To: cmb Block user comment: N Private report: N New Comment: Thanks for the quick verification, Momchil. Previous Comments: ------------------------------------------------------------------------ [2017-12-26 07:01:17] momchil at bojinov dot info Daverandom, please accept my apologies Thank you guys for explaining it to me .. twice For the record, strict standards should be On by default ------------------------------------------------------------------------ [2017-12-25 22:44:23] cmb@php.net > 1 question though - did you run the script on Windows 10 X64 ? Have you read <https://bugs.php.net/how-to-report.php>? :) Anyhow, from looking at the code[1] it seems that daverandom's comment is dead on – if $Ticks' value is an empty string (for example), the for loop in the else branch is not unlikely to be infinite. Please comment out the for loop and see whether that solves *this* issue. [1] <https://github.com/bozhinov/pChart2.0-for-PHP7/blob/f772ff8e0fc10b2e7e9c12e56637870cbcd12a27/pChart/pDraw.php#L827-L831> ------------------------------------------------------------------------ [2017-12-25 21:45:25] momchil at bojinov dot info 1 question though - did you run the script on Windows 10 X64 ? Im told a picture is worth a 1000 words here is 1: http://bojinov.info/momchil/PHP/Capture.png Would you like another one where I have commented line 770 and uncommented line 771 ? ------------------------------------------------------------------------ [2017-12-25 21:18:25] daverandom@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. The two lines you show are not functionally identical. is_null($Ticks) returns true only when $Ticks is null (it is equivalent to the $Ticks === null strict comparison), whereas $Ticks == null will return true when $Ticks is null, false, int(0), an empty string or an empty arrsy. Please debug your code, as the problem does not lie in PHP. For more information, please check the type comparison tables here: http://php.net/manual/en/types.comparisons.php#types.comparisions-loose ------------------------------------------------------------------------ [2017-12-25 20:46:45] momchil at bojinov dot info forgot to mention faulting line: pDraw.php:770 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=75730 -- Edit this bug report at https://bugs.php.net/bug.php?id=75730&edit=1

« previous php.bugs (#213274) next »