diff options
-rw-r--r-- | ext/posix/tests/posix_access.phpt | 2 | ||||
-rw-r--r-- | ext/posix/tests/posix_access_error_modes.phpt | 2 | ||||
-rw-r--r-- | ext/posix/tests/posix_access_error_wrongparams.phpt | 2 | ||||
-rw-r--r-- | ext/posix/tests/posix_access_safemode.phpt | 2 | ||||
-rw-r--r-- | ext/posix/tests/posix_mkfifo_safemode.phpt | 2 | ||||
-rw-r--r-- | main/main.c | 28 |
6 files changed, 16 insertions, 22 deletions
diff --git a/ext/posix/tests/posix_access.phpt b/ext/posix/tests/posix_access.phpt index 86093e2651..47b5e15f0b 100644 --- a/ext/posix/tests/posix_access.phpt +++ b/ext/posix/tests/posix_access.phpt @@ -17,8 +17,6 @@ if (PHP_VERSION_ID < 503099) { die('SKIP Safe mode is no longer available.'); } ?> ---INI-- -safe_mode = 1 --FILE-- <?php $filename = dirname(__FILE__) . '/foo.test'; diff --git a/ext/posix/tests/posix_access_error_modes.phpt b/ext/posix/tests/posix_access_error_modes.phpt index afeb63e1e5..fb04e34683 100644 --- a/ext/posix/tests/posix_access_error_modes.phpt +++ b/ext/posix/tests/posix_access_error_modes.phpt @@ -17,8 +17,6 @@ if (PHP_VERSION_ID < 503099) { die('SKIP Safe mode is no longer available.'); } ?> ---INI-- -safe_mode = 1 --FILE-- <?php $filename = dirname(__FILE__) . '/foo.test'; diff --git a/ext/posix/tests/posix_access_error_wrongparams.phpt b/ext/posix/tests/posix_access_error_wrongparams.phpt index 10c6883cc1..35556a13af 100644 --- a/ext/posix/tests/posix_access_error_wrongparams.phpt +++ b/ext/posix/tests/posix_access_error_wrongparams.phpt @@ -17,8 +17,6 @@ if (PHP_VERSION_ID < 503099) { die('SKIP Safe mode is no longer available.'); } ?> ---INI-- -safe_mode = 1 --FILE-- <?php diff --git a/ext/posix/tests/posix_access_safemode.phpt b/ext/posix/tests/posix_access_safemode.phpt index 0ce1e4c444..b726b4fdbb 100644 --- a/ext/posix/tests/posix_access_safemode.phpt +++ b/ext/posix/tests/posix_access_safemode.phpt @@ -14,8 +14,6 @@ if (posix_geteuid() == 0) { if (PHP_VERSION_ID < 503099) { die('SKIP Safe mode is no longer available.'); } ---INI-- -safe_mode = 1 --FILE-- <?php var_dump(posix_access('/tmp', POSIX_W_OK)); diff --git a/ext/posix/tests/posix_mkfifo_safemode.phpt b/ext/posix/tests/posix_mkfifo_safemode.phpt index 79c4fed57f..1126c00df0 100644 --- a/ext/posix/tests/posix_mkfifo_safemode.phpt +++ b/ext/posix/tests/posix_mkfifo_safemode.phpt @@ -21,8 +21,6 @@ if (PHP_VERSION_ID < 503099) { die('SKIP Safe mode is no longer available.'); } ?> ---INI-- -safe_mode = 1 --FILE-- <?php var_dump(posix_mkfifo('/tmp/foobar', 0644)); diff --git a/main/main.c b/main/main.c index d3edcdc1c5..e6d7ab07e0 100644 --- a/main/main.c +++ b/main/main.c @@ -1825,7 +1825,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod { zend_utility_functions zuf; zend_utility_values zuv; - int module_number=0; /* for REGISTER_INI_ENTRIES() */ + int retval = SUCCESS, module_number=0; /* for REGISTER_INI_ENTRIES() */ char *php_os; zend_module_entry *module; #ifdef ZTS @@ -2135,21 +2135,25 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod }; unsigned int i; + + zend_try { + /* 2 = Count of deprecation structs */ + for (i = 0; i < 2; i++) { + const char **p = directives[i].directives; - /* 2 = Count of deprecation structs */ - for (i = 0; i < 2; i++) { - const char **p = directives[i].directives; + while(*p) { + long value; - while(*p) { - long value; + if (cfg_get_long((char*)*p, &value) == SUCCESS && value) { + zend_error(directives[i].error_level, directives[i].phrase, *p); + } - if (cfg_get_long((char*)*p, &value) == SUCCESS && value) { - zend_error(directives[i].error_level, directives[i].phrase, *p); + ++p; } - - ++p; } - } + } zend_catch { + retval = FAILURE; + } zend_end_try(); } sapi_deactivate(TSRMLS_C); @@ -2159,7 +2163,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod zend_interned_strings_snapshot(TSRMLS_C); /* we're done */ - return SUCCESS; + return retval; } /* }}} */ |