Bug #74515 [Opn->Ver]: ini setting for error_reporting not initialized by default

From: Date: Sun, 30 Apr 2017 10:13:39 +0000
Subject: Bug #74515 [Opn->Ver]: ini setting for error_reporting not initialized by default
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208869@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74515&edit=1 ID: 74515 Updated by: kelunik@php.net Reported by: raat1979 at gmail dot com Summary: ini setting for error_reporting not initialized by default -Status: Open +Status: Verified Type: Bug Package: *Configuration Issues Operating System: Ubuntu Linux PHP Version: 7.1.4 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2017-04-30 09:51:02] raat1979 at gmail dot com Description: ------------ If no error_reporting is defined ( not in php.ini, not in .htaccess, not in source) then ini_get('error_reporting') returns an empty string. however, error_reporting() does return a value ("22519" on 7.1.4) in addition phpinfo() shows master value: "no value" local Value: "22519" after setting error_reporting to the current error_reporting() value the ini value is suddenly set Test script: --------------- <?php echo "<pre>"; var_dump(ini_get('error_reporting')); var_dump(error_reporting()); error_reporting(error_reporting()); var_dump(ini_get('error_reporting')); var_dump(error_reporting()); Expected result: ---------------- /var/www/127.0.0.1/index.php:4:string '22519' (length=5) /var/www/127.0.0.1/index.php:5:int 22519 /var/www/127.0.0.1/index.php:8:string '22519' (length=5) /var/www/127.0.0.1/index.php:9:int 22519 Actual result: -------------- /var/www/127.0.0.1/index.php:4:string '' (length=0) /var/www/127.0.0.1/index.php:5:int 22519 /var/www/127.0.0.1/index.php:8:string '22519' (length=5) /var/www/127.0.0.1/index.php:9:int 22519 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74515&edit=1

« previous php.bugs (#208869) next »