Bug #74515 [NEW]: ini setting for error_reporting not initialized by default
| From: | raat1979 at gmail dot com | Date: | Sun, 30 Apr 2017 09:51:05 +0000 |
| Subject: | Bug #74515 [NEW]: ini setting for error_reporting not initialized by default | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-208868@lists.php.net to get a copy of this message | ||
From: raat1979 at gmail dot com
Operating system: Ubuntu Linux
PHP version: 7.1.4
Package: *Configuration Issues
Bug Type: Bug
Bug description:ini setting for error_reporting not initialized by default
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 bug report at https://bugs.php.net/bug.php?id=74515&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74515&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74515&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74515&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74515&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74515&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74515&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74515&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74515&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74515&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74515&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74515&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74515&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74515&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74515&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74515&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74515&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74515&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74515&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74515&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74515&r=mysqlcfg