From: Jani Taskinen Date: Fri, 4 Sep 2009 11:02:40 +0000 (+0000) Subject: I have no idea. This might or might not fix a bug in some branch. At least it works. X-Git-Tag: php-5.3.2RC1~548 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4361f2370a507d24318e3b87060051f21f468493;p=php I have no idea. This might or might not fix a bug in some branch. At least it works. --- diff --git a/main/main.c b/main/main.c index 6c9224be36..3df9cc23dc 100644 --- a/main/main.c +++ b/main/main.c @@ -1927,33 +1927,6 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod return FAILURE; } - /* Check for deprecated directives */ - { - static const char *directives[] = { - "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 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 */ REGISTER_INI_ENTRIES(); @@ -2047,6 +2020,34 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod shutdown_memory_manager(1, 0 TSRMLS_CC); + /* Check for deprecated directives */ + { + static const char *directives[] = { + "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 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"); + } + } + /* we're done */ return SUCCESS; }