diff options
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 6af19d6d18..4b5b9fe2c2 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2964,8 +2964,8 @@ const zend_function_entry basic_functions[] = { /* {{{ */ PHP_DEP_FALIAS(magic_quotes_runtime, set_magic_quotes_runtime, arginfo_set_magic_quotes_runtime) PHP_DEP_FE(set_magic_quotes_runtime, arginfo_set_magic_quotes_runtime) - PHP_FE(get_magic_quotes_gpc, arginfo_get_magic_quotes_gpc) - PHP_FE(get_magic_quotes_runtime, arginfo_get_magic_quotes_runtime) + PHP_DEP_FE(get_magic_quotes_gpc, arginfo_get_magic_quotes_gpc) + PHP_DEP_FE(get_magic_quotes_runtime, arginfo_get_magic_quotes_runtime) PHP_FE(error_log, arginfo_error_log) PHP_FE(error_get_last, arginfo_error_get_last) @@ -4556,7 +4556,7 @@ PHP_FUNCTION(get_cfg_var) /* }}} */ /* {{{ proto bool set_magic_quotes_runtime(int new_setting) - Set the current active configuration setting of magic_quotes_runtime and return previous */ + magic_quotes_runtime is not supported anymore */ PHP_FUNCTION(set_magic_quotes_runtime) { zend_bool new_setting; @@ -4564,11 +4564,11 @@ PHP_FUNCTION(set_magic_quotes_runtime) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &new_setting) == FAILURE) { return; } - - if (zend_alter_ini_entry_ex("magic_quotes_runtime", sizeof("magic_quotes_runtime"), new_setting ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == FAILURE) { - RETURN_FALSE; + + if (new_setting) { + php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "magic_quotes_runtime is not supported anymore"); } - RETURN_TRUE; + RETURN_FALSE; } /* }}} */ @@ -4576,7 +4576,10 @@ PHP_FUNCTION(set_magic_quotes_runtime) Get the current active configuration setting of magic_quotes_runtime */ PHP_FUNCTION(get_magic_quotes_runtime) { - RETURN_LONG(PG(magic_quotes_runtime)); + if (zend_parse_parameters_none() == FAILURE) { + return; + } + RETURN_FALSE; } /* }}} */ @@ -4584,7 +4587,10 @@ PHP_FUNCTION(get_magic_quotes_runtime) Get the current active configuration setting of magic_quotes_gpc */ PHP_FUNCTION(get_magic_quotes_gpc) { - RETURN_LONG(PG(magic_quotes_gpc)); + if (zend_parse_parameters_none() == FAILURE) { + return; + } + RETURN_FALSE; } /* }}} */ |
