summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-05-08 22:21:19 +0000
committerFelipe Pena <felipe@php.net>2008-05-08 22:21:19 +0000
commit3e56d46fa1463f2cf702f173680cf9c1cee787ea (patch)
tree8c9d3dfec48a83bbe1971e5b58862541ceee336e
parent1e650ca32d673b826eee6b0295a56296df9d9491 (diff)
downloadphp-git-3e56d46fa1463f2cf702f173680cf9c1cee787ea.tar.gz
- Use PHP_DEP_FE and PHP_DEP_FALIAS (magic_quotes related functions)
-rw-r--r--ext/standard/basic_functions.c12
-rw-r--r--ext/standard/tests/file/magic_quotes.phpt26
2 files changed, 18 insertions, 20 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 780e576d33..16222432ee 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -3345,10 +3345,10 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(set_time_limit, arginfo_set_time_limit)
PHP_FE(get_cfg_var, arginfo_get_cfg_var)
- 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, arginfo_import_request_variables)
PHP_FE(error_log, arginfo_error_log)
@@ -4927,8 +4927,6 @@ PHP_FUNCTION(set_magic_quotes_runtime)
RETURN_FALSE;
}
- php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated and removed in PHP 6. See http://php.net/{migrate}#set_magic_quotes_runtime for details.");
-
convert_to_boolean_ex(new_setting);
PG(magic_quotes_runtime) = (zend_bool) Z_LVAL_PP(new_setting);
@@ -4940,7 +4938,6 @@ PHP_FUNCTION(set_magic_quotes_runtime)
Get the current active configuration setting of magic_quotes_runtime */
PHP_FUNCTION(get_magic_quotes_runtime)
{
- php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated and removed in PHP 6. See http://php.net/{migrate}#get_magic_quotes_runtime for details.");
RETURN_LONG(PG(magic_quotes_runtime));
}
/* }}} */
@@ -4949,7 +4946,6 @@ PHP_FUNCTION(get_magic_quotes_runtime)
Get the current active configuration setting of magic_quotes_gpc */
PHP_FUNCTION(get_magic_quotes_gpc)
{
- php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated and removed in PHP 6. See http://php.net/{migrate}#get_magic_quotes_gpc for details.");
RETURN_LONG(PG(magic_quotes_gpc));
}
/* }}} */
diff --git a/ext/standard/tests/file/magic_quotes.phpt b/ext/standard/tests/file/magic_quotes.phpt
index fb8da6dd62..984d3d5c5c 100644
--- a/ext/standard/tests/file/magic_quotes.phpt
+++ b/ext/standard/tests/file/magic_quotes.phpt
@@ -43,44 +43,46 @@ var_dump(file_get_contents($filename));
echo "Done\n";
?>
--EXPECTF--
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
int(0)
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
int(0)
-Deprecated: set_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(true)
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
int(1)
-Deprecated: set_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(true)
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
int(1)
string(30) "some\'content\'here\"and}there"
-Deprecated: set_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(true)
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
int(0)
string(27) "some'content'here"and}there"
-Deprecated: set_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(true)
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
int(1)
string(30) "some\'content\'here\"and}there"
-Deprecated: set_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(true)
+
+Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(false)
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
int(0)
string(27) "some'content'here"and}there"
Done