#50435 [Opn]: Fatal error thrown for removed ini directives isn't fatal

From: Date: Thu, 10 Dec 2009 03:27:52 +0000
Subject: #50435 [Opn]: Fatal error thrown for removed ini directives isn't fatal
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145607@lists.php.net to get a copy of this message
 ID:               50435
 Updated by:       arpad@php.net
 Reported By:      arpad@php.net
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: N/A
 PHP Version:      6SVN-2009-12-10 (SVN)
 New Comment:

Trivial patch correcting the grammatical error too:

Index: main/main.c
===================================================================
--- main/main.c	(revision 291937)
+++ main/main.c	(working copy)
@@ -2075,7 +2075,7 @@
 
 		while (*p) {
 			if (cfg_get_long((char*)*p, &val) == SUCCESS && val) {
-				zend_error(E_ERROR, "Directive '%s' no longer exist in PHP 6 and
greater", *p);
+				zend_error(E_CORE_ERROR, "Directive '%s' no longer exists in PHP 6
and greater", *p);
 			}
 			++p;
 		}


Previous Comments:
------------------------------------------------------------------------

[2009-12-10 03:23:24] arpad@php.net

Description:
------------
The check for removed ini directives in php_module_startup
(main/main.c) was changed to use E_ERROR instead of E_WARNING:
http://svn.php.net/viewvc/php/php-src/trunk/main/main.c?r1=288037&r2=288038&

Since it is run before module_initialized is set to 1, php_error_cb
skips the bailout.

If it's supposed to be fatal then it should be E_CORE_ERROR, as
README.UPDATING_TO_PHP6 says.

Reproduce code:
---------------
php -d register_globals=1 -r 'echo "hi\n";'

Expected result:
----------------
PHP Fatal error:  Directive 'register_globals' no longer exist in PHP 6
and greater in Unknown on line 0


Actual result:
--------------
PHP Fatal error:  Directive 'register_globals' no longer exist in PHP 6
and greater in Unknown on line 0
hi



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50435&edit=1



Thread (4 messages)

« previous php.bugs (#145607) next »