Skip to content

Commit 29ef077

Browse files
committed
Remove magic quotes legacy
1 parent 6339260 commit 29ef077

File tree

7 files changed

+1
-56
lines changed

7 files changed

+1
-56
lines changed

ext/opcache/Optimizer/sccp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,7 @@ static inline int ct_eval_func_call(
786786
int overflow;
787787

788788
if (num_args == 0) {
789-
if (zend_string_equals_literal(name, "get_magic_quotes_gpc")
790-
|| zend_string_equals_literal(name, "get_magic_quotes_gpc_runtime")
791-
|| zend_string_equals_literal(name, "php_sapi_name")
789+
if (zend_string_equals_literal(name, "php_sapi_name")
792790
|| zend_string_equals_literal(name, "imagetypes")
793791
|| zend_string_equals_literal(name, "phpversion")) {
794792
/* pass */

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,6 @@ static const func_info_t func_infos[] = {
274274
F1("quoted_printable_encode", MAY_BE_STRING),
275275
F1("get_current_user", MAY_BE_STRING),
276276
F1("get_cfg_var", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
277-
F0("get_magic_quotes_gpc", MAY_BE_FALSE),
278-
F0("get_magic_quotes_runtime", MAY_BE_FALSE),
279277
F1("error_get_last", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
280278
FN("call_user_func", UNKNOWN_INFO),
281279
FN("call_user_func_array", UNKNOWN_INFO),

ext/standard/basic_functions.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,9 +1136,6 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
11361136
PHP_FE(header_register_callback, arginfo_header_register_callback)
11371137
PHP_FE(get_cfg_var, arginfo_get_cfg_var)
11381138

1139-
PHP_DEP_FE(get_magic_quotes_gpc, arginfo_get_magic_quotes_gpc)
1140-
PHP_DEP_FE(get_magic_quotes_runtime, arginfo_get_magic_quotes_runtime)
1141-
11421139
PHP_FE(error_log, arginfo_error_log)
11431140
PHP_FE(error_get_last, arginfo_error_get_last)
11441141
PHP_FE(error_clear_last, arginfo_error_clear_last)
@@ -2881,28 +2878,6 @@ PHP_FUNCTION(get_cfg_var)
28812878
}
28822879
/* }}} */
28832880

2884-
/* {{{ proto false get_magic_quotes_runtime(void)
2885-
Get the current active configuration setting of magic_quotes_runtime */
2886-
PHP_FUNCTION(get_magic_quotes_runtime)
2887-
{
2888-
if (zend_parse_parameters_none() == FAILURE) {
2889-
return;
2890-
}
2891-
RETURN_FALSE;
2892-
}
2893-
/* }}} */
2894-
2895-
/* {{{ proto false get_magic_quotes_gpc(void)
2896-
Get the current active configuration setting of magic_quotes_gpc */
2897-
PHP_FUNCTION(get_magic_quotes_gpc)
2898-
{
2899-
if (zend_parse_parameters_none() == FAILURE) {
2900-
return;
2901-
}
2902-
RETURN_FALSE;
2903-
}
2904-
/* }}} */
2905-
29062881
/*
29072882
1st arg = error message
29082883
2nd arg = error option

ext/standard/basic_functions.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ PHP_FUNCTION(set_time_limit);
7272
PHP_FUNCTION(header_register_callback);
7373

7474
PHP_FUNCTION(get_cfg_var);
75-
PHP_FUNCTION(get_magic_quotes_runtime);
76-
PHP_FUNCTION(get_magic_quotes_gpc);
7775

7876
PHP_FUNCTION(error_log);
7977
PHP_FUNCTION(error_get_last);

ext/standard/basic_functions.stub.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,6 @@ function get_current_user(): string {}
273273

274274
function get_cfg_var(string $option_name): string|array|false {}
275275

276-
function get_magic_quotes_runtime(): bool {}
277-
278-
function get_magic_quotes_gpc(): bool {}
279-
280276
function error_log(string $message, int $message_type = 0, string $destination = UNKNOWN, string $extra_headers = UNKNOWN): bool {}
281277

282278
function error_get_last(): ?array {}

ext/standard/basic_functions_arginfo.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,6 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_cfg_var, 0, 1, MAY_BE_STRING
427427
ZEND_ARG_TYPE_INFO(0, option_name, IS_STRING, 0)
428428
ZEND_END_ARG_INFO()
429429

430-
#define arginfo_get_magic_quotes_runtime arginfo_ob_flush
431-
432-
#define arginfo_get_magic_quotes_gpc arginfo_ob_flush
433-
434430
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_error_log, 0, 1, _IS_BOOL, 0)
435431
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
436432
ZEND_ARG_TYPE_INFO(0, message_type, IS_LONG, 0)

ext/standard/tests/general_functions/bug55371.phpt

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)