summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend.c4
-rw-r--r--main/main.c2
-rw-r--r--tests/output/bug74815.phpt15
3 files changed, 17 insertions, 4 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index 0cb0cc7d41..376e792eca 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -888,13 +888,9 @@ void zend_post_startup(void) /* {{{ */
}
free(EG(zend_constants));
- virtual_cwd_deactivate();
-
executor_globals_ctor(executor_globals);
global_persistent_list = &EG(persistent_list);
zend_copy_ini_directives();
-#else
- virtual_cwd_deactivate();
#endif
}
/* }}} */
diff --git a/main/main.c b/main/main.c
index 90dc78d8b4..4ef2b41639 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2359,6 +2359,8 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
} zend_end_try();
}
+ virtual_cwd_deactivate();
+
sapi_deactivate();
module_startup = 0;
diff --git a/tests/output/bug74815.phpt b/tests/output/bug74815.phpt
new file mode 100644
index 0000000000..be4fa1b2cb
--- /dev/null
+++ b/tests/output/bug74815.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #74815 crash with a combination of INI entries at startup
+--FILE--
+<?php
+
+$php = getenv("TEST_PHP_EXECUTABLE");
+
+echo shell_exec("$php -n -d error_log=errors.log -d error_reporting=E_ALL -d log_errors=On -d track_errors=On -v");
+
+?>
+==DONE==
+--EXPECTF--
+Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
+%A
+==DONE==