Bug #71873 [Opn->Ver]: Warning:zend.assertions may be completely enabled or disabled only in php.ini
Edit report at https://bugs.php.net/bug.php?id=71873&edit=1
ID: 71873
Updated by: cmb@php.net
Reported by: ildar dot aim at gmail dot com
Summary: Warning:zend.assertions may be completely enabled or
disabled only in php.ini
-Status: Open
+Status: Verified
Type: Bug
Package: *General Issues
-Operating System: Linux
+Operating System: *
PHP Version: 7.0.4
Block user comment: N
Private report: N
New Comment:
Indeed, there is obviously a contradiction in the code:
<https://github.com/php/php-src/blob/php-7.0.5RC1/Zend/zend.c#L121>
vs.
<https://github.com/php/php-src/blob/php-7.0.5RC1/Zend/zend.c#L132>.
Previous Comments:
------------------------------------------------------------------------
[2016-03-21 17:25:10] ildar dot aim at gmail dot com
Description:
------------
According to
http://php.net/manual/en/ini.core.php
zend.assertions is PHP_INI_ALL
In spite of this fact my script generates php warninig
"Warning: zend.assertions may be completely enabled or disabled only in php.ini"
-------------
My info
aim-server[~/tmp]$ php -i |grep -i assert
zend.assertions => -1 => -1
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.exception => 0 => 0
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
aim-server[~/tmp]$
aim-server[~/tmp]$ php -v
PHP 7.0.4 (cli) (built: Mar 5 2016 09:28:27) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
aim-server[~/tmp]$
Test script:
---------------
error_reporting(-1);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('zend.assertions', 1);
var_dump('end');die;
Expected result:
----------------
string(3) "end"
Actual result:
--------------
PHP Warning: zend.assertions may be completely enabled or disabled only in php.ini in
/home/aim/tmp/home.php on line 46
PHP Stack trace:
PHP 1. {main}() /home/aim/tmp/home.php:0
PHP 2. ini_set() /home/aim/tmp/home.php:46
Warning: zend.assertions may be completely enabled or disabled only in php.ini in
/home/aim/tmp/home.php on line 46
Call Stack:
0.0002 399768 1. {main}() /home/aim/tmp/home.php:0
0.0002 400280 2. ini_set() /home/aim/tmp/home.php:46
/home/aim/tmp/home.php:47:
string(3) "end"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71873&edit=1
Thread (4 messages)