]> granicus.if.org Git - php/commitdiff
Added E_DEPRECATED startup notice (5.3 only)
authorKalle Sommer Nielsen <kalle@php.net>
Mon, 4 May 2009 21:18:22 +0000 (21:18 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Mon, 4 May 2009 21:18:22 +0000 (21:18 +0000)
23 files changed:
NEWS
ext/filter/tests/bug39763.phpt
ext/filter/tests/bug42718-2.phpt
ext/pcre/tests/bug33200.phpt
ext/session/tests/001.phpt
ext/session/tests/003.phpt
ext/session/tests/004.phpt
ext/session/tests/005.phpt
ext/session/tests/006.phpt
ext/session/tests/007.phpt
ext/session/tests/008-php4.2.3.phpt
ext/session/tests/009.phpt
ext/session/tests/012.phpt
ext/session/tests/013.phpt
ext/session/tests/014.phpt
ext/session/tests/019.phpt
ext/standard/tests/general_functions/putenv_error1.phpt
ext/standard/tests/general_functions/putenv_error2.phpt
ext/standard/tests/misc/syslog_vars_variation1.phpt
ext/standard/tests/network/define_syslog_variables_variation-win32.phpt
main/main.c
tests/basic/bug46313-win.phpt
tests/security/magic_quotes_gpc.phpt

diff --git a/NEWS b/NEWS
index 83acaf9b22cf99150e67f7a7472a79c470030004..802d0aa39d3960de3cff618db4ee636d98578f1a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-PHP                                                                        NEWS
+PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 200?, PHP 5.3.0 RC 2
 - Upgraded bundled sqlite to version 3.6.13. (Ilia)
@@ -26,6 +26,7 @@ PHP                                                                        NEWS
   disable this behaviour using "http"=>array("auto_decode"=>0) in stream
   context. (Dmitry)
 - Added ability to throw exceptions from SQLite3 instead of warnings. (Scott)
+- Added startup notices for deprecated ini settings. (Kalle)
 
 - Fixed bug #48087 (call_user_method() invalid free of arguments). (Felipe)
 - Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
index b0eaaadf0fdac5c03588af8a2ce27575e926f4b0..1a0759956444a49b289c3630ba466ffd099a81f1 100644 (file)
@@ -14,3 +14,4 @@ echo $val . "\n";
 --EXPECT--     
 \"probably a bug\"
 \"probably a bug\"
+PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
\ No newline at end of file
index fd2a91d9d464a1d0cc375967a60ec036338e37f5..d33eabeb895376af018a5ba252a9becf2c23c318 100644 (file)
@@ -18,3 +18,4 @@ echo addcslashes($_GET['a'],"\0") . "\n";
 unsafe_raw
 
 1\0
+PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
index b00b72ac28f48f6a92170adeb950f3b33c7e6e06..5ad5b78c87a0245db7f9fe8322e6bdda3ef06377 100644 (file)
@@ -6,7 +6,8 @@ magic_quotes_sybase=1
 <?php
 $str = 'some \'$sample\' text';
 $str = preg_replace("/(some.*text)/e", "strtoupper('\\1')", $str);
-echo $str;
+echo $str . "\r\n";
 ?>
 --EXPECT--
 SOME '$SAMPLE' TEXT
+PHP Warning:  Directive 'magic_quotes_sybase' is deprecated in PHP 5.3 and greater in Unknown on line 0
index b2cd5ba2c229e8007f0c21f6ba613f003d30fd41..f0d7af6ff74b6c3e9e81f8dea4c826f0f6b89054 100644 (file)
@@ -35,4 +35,4 @@ Deprecated: Function session_register() is deprecated in %s on line %d
 
 Deprecated: Function session_register() is deprecated in %s on line %d
 baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";s:4:"done";}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";s:4:"done";}}
-
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 9972358e1a1fcbaaee46b55c9cf407081a019d49..ae7a7c18c237b4670b2fa72f702afe6d4a0a2291 100644 (file)
@@ -43,3 +43,4 @@ array(1) {
     int(2)
   }
 }
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index b9013cac706bb6f9565e94caeea1572015260e14..529e1d9aa26e418a80386cd2d05e4197ce065db3 100644 (file)
@@ -109,3 +109,4 @@ array(1) {
   }
 }
 DESTROY: abtest
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 9b3adf10b819fd0b959aa6b82e1cb844e789748b..9a4ed3ab016cabc839d034fcd7a7c2e5424ca073 100644 (file)
@@ -146,3 +146,4 @@ array(1) {
 int(123)
 DESTROY: abtest
 CLOSE
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 8094d32bc5ad1433011dd02cd7252688dcfc2ee8..b481face44f5f8b3f26acca4337a2d842e257c8e 100644 (file)
@@ -77,3 +77,4 @@ object(b)#%d (1) {
     string(5) "hallo"
   }
 }
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index a98af19856ad756ba5900e1084a80af01ec681b8..71a9f105e7136cd498ac603614e7775bad9f2c9d 100644 (file)
@@ -61,3 +61,5 @@ array(1) {
   ["c"]=>
   &float(3.14)
 }
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
+PHP Warning:  Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 7d31f2e3de82757d8b29a7f6f05e74160715d9af..85b89b33ff47058693682b2c34e9ca6fe452b3db 100644 (file)
@@ -69,3 +69,4 @@ array(1) {
   ["c"]=>
   float(3.14)
 }
+PHP Warning:  Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 903b8be3a5e6e49d46869669d51831b3af99ef56..dee12a0c340613bb94ab2f1ec74d20dd988106cb 100644 (file)
@@ -57,3 +57,4 @@ array(0) {
 }
 array(0) {
 }
+PHP Warning:  Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 7fd91c9f2f30f5ec4e973366699d9b5e8d5193e1..6e2c406ae8ad6406d0ff91370b8e15d290ac05df 100644 (file)
@@ -34,3 +34,4 @@ print "I live\n";
 --EXPECTF--
 Deprecated: Function session_register() is deprecated in %s on line %d
 I live
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 54ccaeddb70d552cbd44cf197f9cd39a8f187ba2..17622d33f4d8b12df68890383fe72a2ff94f8c70 100644 (file)
@@ -25,3 +25,4 @@ print "I live\n";
 ?>
 --EXPECT--
 I live
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index e5734bc6e942adb5090cdab672c883fee250a32d..b91ac7835a49dc65e641c0c0d16439aa707af49f 100644 (file)
@@ -40,3 +40,4 @@ Warning: ini_set(): A session is active. You cannot change the session module's
 
 Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in %s on line %d
 <a href="/link?PHPSESSID=abtest">
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index e008e8b638ff64ae8990fd4b43a567dbaa81729d..84e6bba194a81973c96b1c6e624bff04e19fe241 100644 (file)
@@ -72,3 +72,4 @@ array(2) {
     int(44)
   }
 }
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 4e4fc40fbb3b57c9251c7f38705d50ca4e359c00..941c3f3c7ccdbee761103218db4256a439400148 100644 (file)
@@ -22,3 +22,4 @@ Warning: putenv(): Safe Mode warning: Cannot set environment variable 'BAZ' - it
 it worked
 it worked
 ==DONE==
+PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
index a98a93461ce406b3b8f0b89a39f4c9dd1247071c..904b9b21749f7584022a05393b9ea7771dad39ff 100644 (file)
@@ -16,3 +16,4 @@ Warning: putenv(): Safe Mode warning: Cannot override protected environment vari
 
 Warning: putenv(): Safe Mode warning: Cannot override protected environment variable 'BAZ' in %s on line %d
 ==DONE==
+PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
index 7cac8adf63eb4e5c42b350dde28b24f9b5c26d4b..adf64cb1e82bc5db199bee266e4acea8262cf49e 100644 (file)
@@ -8,3 +8,4 @@ var_dump(isset($LOG_ERR));
 ?>
 --EXPECTF--
 bool(true)
+PHP Warning:  Directive 'define_syslog_variables' is deprecated in PHP 5.3 and greater in Unknown on line 0
index b5bfdd263f0250c4f19c28c82ee05029822e7cdb..ac7dac8ab222bc1ecb6580ee28b23c79a270daf4 100644 (file)
@@ -94,3 +94,4 @@ if ($failed == false) {
 *** Testing define_syslog_variables() : variation ***
 PASSED
 ===DONE===
+PHP Warning:  Directive 'define_syslog_variables' is deprecated in PHP 5.3 and greater in Unknown on line 0
index de964a80ca837972021a2cff19ffc56b726afb81..da082359a050b5e9df159884f788b2b90e8757bf 100644 (file)
@@ -1901,17 +1901,28 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
        /* Check for deprecated directives */
        {
                static const char *directives[] = {
-                       "zend.ze1_compatibility_mode",
+                       "define_syslog_variables", 
+                       "register_globals", 
+                       "register_long_arrays", 
+                       "safe_mode", 
+                       "magic_quotes_gpc", 
+                       "magic_quotes_runtime", 
+                       "magic_quotes_sybase", 
                        NULL};
                const char **p = directives;
                long val;
 
                while (*p) {
                        if (cfg_get_long((char*)*p, &val) == SUCCESS && val) {
-                               zend_error(E_WARNING, "Directive '%s' is no longer supported in PHP 5.3 and greater", *p);
+                               zend_error(E_WARNING, "Directive '%s' is deprecated in PHP 5.3 and greater", *p);
                        }
                        ++p;
                }
+
+               /* This is not too nice, but since its the only one theres no need for extra stuff here */
+               if (cfg_get_long("zend.ze1_compatibility_mode", &val) == SUCCESS && val) {
+                       zend_error(E_ERROR, "zend.ze1_compatibility_mode is no longer supported in PHP 5.3 and greater");
+               }
        }
 
        /* Register PHP core ini entries */
index 276efe196f72c9a49fbf60b3c1052bff3d7f8256..a85178995d2a17b18bc92af27b0e22f781370374 100644 (file)
@@ -60,3 +60,6 @@ string(12) "o1"
 bool(true)
 string(%d) "%s"
 bool(true)
+PHP Warning:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
+PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
+
index eb5b84242a5a0aea51f2bd4bc878e1668f3acabe..64f7179cfe9ef453a718e37fca95f8dbb0ec84af 100644 (file)
@@ -10,3 +10,4 @@ echo $_GET['a'],"\n";
 ?>
 --EXPECT--
 abc\'\"\0123
+PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0