summaryrefslogtreecommitdiff
path: root/main/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/main/main.c b/main/main.c
index 18d0b43d36..0841bd4829 100644
--- a/main/main.c
+++ b/main/main.c
@@ -774,7 +774,6 @@ PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("auto_globals_jit", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, auto_globals_jit, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("short_open_tag", DEFAULT_SHORT_OPEN_TAG, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, short_tags, zend_compiler_globals, compiler_globals)
- STD_PHP_INI_BOOLEAN("track_errors", "0", PHP_INI_ALL, OnUpdateBool, track_errors, php_core_globals, core_globals)
STD_PHP_INI_ENTRY("unserialize_callback_func", NULL, PHP_INI_ALL, OnUpdateString, unserialize_callback_func, php_core_globals, core_globals)
STD_PHP_INI_ENTRY("serialize_precision", "-1", PHP_INI_ALL, OnSetSerializePrecision, serialize_precision, php_core_globals, core_globals)
@@ -1138,18 +1137,6 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
efree(docref_buf);
}
- if (PG(track_errors) && module_initialized && EG(active) &&
- (Z_TYPE(EG(user_error_handler)) == IS_UNDEF || !(EG(user_error_handler_error_reporting) & type))) {
- zval tmp;
- ZVAL_STRINGL(&tmp, buffer, buffer_len);
- if (EG(current_execute_data)) {
- if (zend_set_local_var_str("php_errormsg", sizeof("php_errormsg")-1, &tmp, 0) == FAILURE) {
- zval_ptr_dtor(&tmp);
- }
- } else {
- zend_hash_str_update_ind(&EG(symbol_table), "php_errormsg", sizeof("php_errormsg")-1, &tmp);
- }
- }
if (replace_buffer) {
zend_string_free(replace_buffer);
} else {
@@ -1457,19 +1444,6 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
return;
}
- if (PG(track_errors) && module_initialized && EG(active)) {
- zval tmp;
-
- ZVAL_STRINGL(&tmp, buffer, buffer_len);
- if (EG(current_execute_data)) {
- if (zend_set_local_var_str("php_errormsg", sizeof("php_errormsg")-1, &tmp, 0) == FAILURE) {
- zval_ptr_dtor(&tmp);
- }
- } else {
- zend_hash_str_update_ind(&EG(symbol_table), "php_errormsg", sizeof("php_errormsg")-1, &tmp);
- }
- }
-
efree(buffer);
}
/* }}} */
@@ -2398,13 +2372,12 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
struct {
const long error_level;
const char *phrase;
- const char *directives[17]; /* Remember to change this if the number of directives change */
+ const char *directives[18]; /* Remember to change this if the number of directives change */
} directives[2] = {
{
E_DEPRECATED,
"Directive '%s' is deprecated",
{
- "track_errors",
NULL
}
},
@@ -2428,6 +2401,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
"safe_mode_allowed_env_vars",
"safe_mode_protected_env_vars",
"zend.ze1_compatibility_mode",
+ "track_errors",
NULL
}
}