Skip to content

Commit a60efc5

Browse files
committed
Remove set_magic_quotes_runtime
And the alias magic_quotes_runtime
1 parent 4c115b6 commit a60efc5

9 files changed

+3
-111
lines changed

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ UPGRADING.INTERNALS merge=NEWS
4949
/ext/spl/tests/SplArray_fromArray.phpt -crlf
5050
/ext/standard/tests/dir/scandir_variation3.phpt -crlf
5151
/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt -crlf
52-
/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt -crlf
5352
/ext/standard/tests/strings/bug26817.phpt -crlf
5453
/ext/standard/tests/strings/bug26973.phpt -crlf
5554
/ext/standard/tests/strings/bug27457.phpt -crlf

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
. Added intdiv() function. (Andrea)
110110
. Improved precision of log() function for base 2 and 10. (Marc Bennewitz)
111111
. Remove string category support in setlocale(). (Nikita)
112+
. Remove set_magic_quotes_runtime() and its alias magic_quotes_runtime().
113+
(Nikita)
112114

113115
- Streams:
114116
. Fixed bug #68532 (convert.base64-encode omits padding bytes).

UPGRADING

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ PHP X.Y UPGRADE NOTES
7878
- Standard:
7979
. Removed string category support in setlocale(). Use the LC_* constants
8080
instead.
81+
. Removed set_magic_quotes_runtime() and its alias magic_quotes_runtime().
8182

8283
========================================
8384
2. New Features

ext/standard/basic_functions.c

-23
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,6 @@ ZEND_END_ARG_INFO()
607607
ZEND_BEGIN_ARG_INFO(arginfo_get_magic_quotes_runtime, 0)
608608
ZEND_END_ARG_INFO()
609609

610-
ZEND_BEGIN_ARG_INFO_EX(arginfo_set_magic_quotes_runtime, 0, 0, 1)
611-
ZEND_ARG_INFO(0, new_setting)
612-
ZEND_END_ARG_INFO()
613-
614610
ZEND_BEGIN_ARG_INFO(arginfo_constant, 0)
615611
ZEND_ARG_INFO(0, const_name)
616612
ZEND_END_ARG_INFO()
@@ -2937,8 +2933,6 @@ const zend_function_entry basic_functions[] = { /* {{{ */
29372933
PHP_FE(header_register_callback, arginfo_header_register_callback)
29382934
PHP_FE(get_cfg_var, arginfo_get_cfg_var)
29392935

2940-
PHP_DEP_FALIAS(magic_quotes_runtime, set_magic_quotes_runtime, arginfo_set_magic_quotes_runtime)
2941-
PHP_DEP_FE(set_magic_quotes_runtime, arginfo_set_magic_quotes_runtime)
29422936
PHP_FE(get_magic_quotes_gpc, arginfo_get_magic_quotes_gpc)
29432937
PHP_FE(get_magic_quotes_runtime, arginfo_get_magic_quotes_runtime)
29442938

@@ -4572,23 +4566,6 @@ PHP_FUNCTION(get_cfg_var)
45724566
}
45734567
/* }}} */
45744568

4575-
/* {{{ proto bool set_magic_quotes_runtime(int new_setting)
4576-
magic_quotes_runtime is not supported anymore */
4577-
PHP_FUNCTION(set_magic_quotes_runtime)
4578-
{
4579-
zend_bool new_setting;
4580-
4581-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &new_setting) == FAILURE) {
4582-
return;
4583-
}
4584-
4585-
if (new_setting) {
4586-
php_error_docref(NULL, E_CORE_ERROR, "magic_quotes_runtime is not supported anymore");
4587-
}
4588-
RETURN_FALSE;
4589-
}
4590-
/* }}} */
4591-
45924569
/* {{{ proto int get_magic_quotes_runtime(void)
45934570
Get the current active configuration setting of magic_quotes_runtime */
45944571
PHP_FUNCTION(get_magic_quotes_runtime)

ext/standard/basic_functions.h

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ PHP_FUNCTION(set_time_limit);
7676
PHP_FUNCTION(header_register_callback);
7777

7878
PHP_FUNCTION(get_cfg_var);
79-
PHP_FUNCTION(set_magic_quotes_runtime);
8079
PHP_FUNCTION(get_magic_quotes_runtime);
8180
PHP_FUNCTION(get_magic_quotes_gpc);
8281

ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt

-46
This file was deleted.

ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt

-37
This file was deleted.

run-tests.php

-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114

115115
error_reporting(E_ALL);
116116
if (PHP_MAJOR_VERSION < 6) {
117-
ini_set('magic_quotes_runtime',0); // this would break tests by modifying EXPECT sections
118117
if (ini_get('safe_mode')) {
119118
echo <<< SAFE_MODE_WARNING
120119
@@ -236,7 +235,6 @@ function verify_config()
236235
'error_append_string=',
237236
'auto_prepend_file=',
238237
'auto_append_file=',
239-
'magic_quotes_runtime=0',
240238
'ignore_repeated_errors=0',
241239
'precision=14',
242240
'memory_limit=128M',

server-tests.php

-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@ class testHarness {
472472
'error_append_string'=>'',
473473
'auto_prepend_file'=>'',
474474
'auto_append_file'=>'',
475-
'magic_quotes_runtime'=>'0',
476475
);
477476
public $env = array();
478477
public $info_params = array();

0 commit comments

Comments
 (0)