Bug #67117 [NEW]: Interactive shell and suppressed fatals

From: Date: Wed, 23 Apr 2014 14:13:18 +0000
Subject: Bug #67117 [NEW]: Interactive shell and suppressed fatals
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185386@lists.php.net to get a copy of this message
From: joni2back at gmail dot com Operating system: Debian 7 PHP version: 5.5.11 Package: CGI/CLI related Bug Type: Bug Bug description:Interactive shell and suppressed fatals Description: ------------ Regarding than older versions of PHP such as 5.3 in the interactive shell mode; When a fatal error occurs, this shell exits with 255 code. Actually in 5.5.7, when a fatal error occurs, the shell continues executing code. So, when a possible fatal error is suppressed, the shell will no alert again to other kind of errors Test script: --------------- Example php 5.3 (shell exits with 255): httpd@dev:~$ php -a; echo exitstatus: $? Interactive shell php > @undefined(); exitstatus: 255 httpd@dev:~$ Example php 5.5.7 (shell continues): Interactive shell httpd@dev55:~$ php -a php > $var = 3; php > undefined(); PHP Fatal error: Call to undefined function undefined() in php shell code on line 1 Fatal error: Call to undefined function undefined() in php shell code on line 1 php > echo $var . "\n"; 3 Example php 5.5.7 (shell continues so weird): php > $var = 3; php > @undefined(); php > echo $var . "\n"; 3 php > notdefined(); php > really_not_defined(); php > @really_not_defined(); php > []+$1 ==== class; php > Expected result: ---------------- Alert on next errors Actual result: -------------- Not alerting next errors (fatal, warnings, syntax, etc) -- Edit bug report at https://bugs.php.net/bug.php?id=67117&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67117&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67117&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67117&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=67117&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=67117&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=67117&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=67117&r=needscript Try newer version: https://bugs.php.net/fix.php?id=67117&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=67117&r=support Expected behavior: https://bugs.php.net/fix.php?id=67117&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=67117&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=67117&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=67117&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67117&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=67117&r=dst IIS Stability: https://bugs.php.net/fix.php?id=67117&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=67117&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=67117&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=67117&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=67117&r=mysqlcfg

« previous php.bugs (#185386) next »