mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
- remove magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase
(calling ini_set('magic_....') returns 0|false - get_magic_quotes_gpc, get_magic_quotes_runtime are kept but always return false - set_magic_quotes_runtime raises an E_CORE_ERROR
This commit is contained in:
parent
b7d6d705f1
commit
bb1ec86f9d
44 changed files with 105 additions and 525 deletions
|
@ -442,11 +442,11 @@ zend_function_entry basic_functions[] = {
|
|||
PHP_FE(get_current_user, NULL)
|
||||
PHP_FE(set_time_limit, NULL)
|
||||
PHP_FE(get_cfg_var, NULL)
|
||||
PHP_FALIAS(magic_quotes_runtime, set_magic_quotes_runtime, NULL)
|
||||
PHP_FE(set_magic_quotes_runtime, NULL)
|
||||
PHP_FE(get_magic_quotes_gpc, NULL)
|
||||
PHP_FE(get_magic_quotes_runtime, NULL)
|
||||
|
||||
PHP_DEP_FALIAS(magic_quotes_runtime, set_magic_quotes_runtime, NULL)
|
||||
PHP_DEP_FE(set_magic_quotes_runtime, NULL)
|
||||
PHP_DEP_FE(get_magic_quotes_gpc, NULL)
|
||||
PHP_DEP_FE(get_magic_quotes_runtime, NULL)
|
||||
|
||||
PHP_FE(import_request_variables, NULL)
|
||||
PHP_FE(error_log, NULL)
|
||||
PHP_FE(call_user_func, NULL)
|
||||
|
@ -1151,9 +1151,6 @@ PHP_RINIT_FUNCTION(basic)
|
|||
PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU);
|
||||
PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU);
|
||||
|
||||
/* Reset magic_quotes_runtime */
|
||||
PG(magic_quotes_runtime) = INI_BOOL("magic_quotes_runtime");
|
||||
|
||||
/* Setup default context */
|
||||
FG(default_context) = NULL;
|
||||
|
||||
|
@ -1823,38 +1820,20 @@ 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 */
|
||||
PHP_FUNCTION(set_magic_quotes_runtime)
|
||||
{
|
||||
zval **new_setting;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_setting) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_boolean_ex(new_setting);
|
||||
|
||||
PG(magic_quotes_runtime) = (zend_bool) Z_LVAL_PP(new_setting);
|
||||
RETURN_TRUE;
|
||||
php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "magic_quotes_runtime is not supported anymore");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int get_magic_quotes_runtime(void)
|
||||
Get the current active configuration setting of magic_quotes_runtime */
|
||||
PHP_FUNCTION(get_magic_quotes_runtime)
|
||||
{
|
||||
RETURN_LONG(PG(magic_quotes_runtime));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int get_magic_quotes_gpc(void)
|
||||
Get the current active configuration setting of magic_quotes_gpc */
|
||||
PHP_FUNCTION(get_magic_quotes_gpc)
|
||||
{
|
||||
RETURN_LONG(PG(magic_quotes_gpc));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
1st arg = error message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue