Re: Throwing E_DEPRECATED on startup
| From: | Kalle Sommer Nielsen | Date: | Fri, 06 Feb 2009 20:41:50 +0000 |
| Subject: | Re: Throwing E_DEPRECATED on startup | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42963@lists.php.net to get a copy of this message | ||
2009/2/6 Kalle Sommer Nielsen <kalle@php.net>:
> G'day
>
> [snip]
>
> --
> Kalle Sommer Nielsen
>
Resending the patch, as Felipe said it wasn't there for some odd
reason because of the file extension and for the sake of sanity:
http://paste2.org/p/142865 - PHP_5_3
http://paste2.org/p/142866 - HEAD
--
Kalle Sommer Nielsen
Index: main.c =================================================================== RCS file: /repository/php-src/main/main.c,v retrieving revision 1.640.2.23.2.57.2.45 diff -u -r1.640.2.23.2.57.2.45 main.c --- main.c 17 Jan 2009 01:12:36 -0000 1.640.2.23.2.57.2.45 +++ main.c 6 Feb 2009 17:33:00 -0000 @@ -1871,17 +1871,28 @@ /* 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_DEPRECATED, "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: main.c =================================================================== RCS file: /repository/php-src/main/main.c,v retrieving revision 1.792 diff -u -r1.792 main.c --- main.c 19 Jan 2009 02:25:58 -0000 1.792 +++ main.c 6 Feb 2009 19:03:03 -0000 @@ -1995,7 +1995,7 @@ while (*p) { if (cfg_get_long((char*)*p, &val) == SUCCESS && val) { - zend_error(E_WARNING, "Directive '%s' is no longer supported in PHP 6 and greater", *p); + zend_error(E_ERROR, "Directive '%s' is no longer supported in PHP 6 and greater", *p); } ++p; }
Index: main.c =================================================================== RCS file: /repository/php-src/main/main.c,v retrieving revision 1.640.2.23.2.57.2.45 diff -u -r1.640.2.23.2.57.2.45 main.c --- main.c 17 Jan 2009 01:12:36 -0000 1.640.2.23.2.57.2.45 +++ main.c 6 Feb 2009 17:33:00 -0000 @@ -1871,17 +1871,28 @@ /* 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_DEPRECATED, "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: main.c =================================================================== RCS file: /repository/php-src/main/main.c,v retrieving revision 1.792 diff -u -r1.792 main.c --- main.c 19 Jan 2009 02:25:58 -0000 1.792 +++ main.c 6 Feb 2009 19:03:03 -0000 @@ -1995,7 +1995,7 @@ while (*p) { if (cfg_get_long((char*)*p, &val) == SUCCESS && val) { - zend_error(E_WARNING, "Directive '%s' is no longer supported in PHP 6 and greater", *p); + zend_error(E_ERROR, "Directive '%s' is no longer supported in PHP 6 and greater", *p); } ++p; }