]> granicus.if.org Git - php/commitdiff
I have no idea. This might or might not fix a bug in some branch. At least it works.
authorJani Taskinen <jani@php.net>
Fri, 4 Sep 2009 11:02:40 +0000 (11:02 +0000)
committerJani Taskinen <jani@php.net>
Fri, 4 Sep 2009 11:02:40 +0000 (11:02 +0000)
main/main.c

index 6c9224be36e46983e1327f7240d3dedebc3ff2b0..3df9cc23dc2ec1ccd14259e9fe21d57728589997 100644 (file)
@@ -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;
 }