com php-src: Deprecate string.strip_tags filter: ext/ standard/filters.c ext/standard/tests/filters/strip_tags _filter.phpt
| From: | Nikita Popov | Date: | Sat, 21 Jul 2018 20:38:39 +0000 |
| Subject: | com php-src: Deprecate string.strip_tags filter: ext/ standard/filters.c ext/standard/tests/filters/strip_tags _filter.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102631@lists.php.net to get a copy of this message | ||
Commit: 4a5b2101e51b6be68e2bcb40f2ad6d846db1bdd8
Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 5 Jul 2018 21:27:17 +0200
Parents: d9acfa45b849a9444ae5f341fd016137e4212066
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4a5b2101e51b6be68e2bcb40f2ad6d846db1bdd8
Log:
Deprecate string.strip_tags filter
Part of https://wiki.php.net/rfc/deprecations_php_7_3.
Changed paths:
M ext/standard/filters.c
M ext/standard/tests/filters/strip_tags_filter.phpt
Diff:
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index f738ecf..b5a8bda 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -250,6 +250,8 @@ static php_stream_filter *strfilter_strip_tags_create(const char *filtername, zv
php_stream_filter *filter = NULL;
zend_string *allowed_tags = NULL;;
+ php_error_docref(NULL, E_DEPRECATED, "The string.strip_tags filter is deprecated");
+
inst = pemalloc(sizeof(php_strip_tags_filter), persistent);
if (filterparams != NULL) {
diff --git a/ext/standard/tests/filters/strip_tags_filter.phpt
b/ext/standard/tests/filters/strip_tags_filter.phpt
index 038545a..f353e79 100644
--- a/ext/standard/tests/filters/strip_tags_filter.phpt
+++ b/ext/standard/tests/filters/strip_tags_filter.phpt
@@ -18,7 +18,12 @@ fwrite($fp, "test <b>bold</b> <i>italic</i>
test\n");
fclose($fp);
?>
---EXPECT--
+--EXPECTF--
+Deprecated: stream_filter_append(): The string.strip_tags filter is deprecated in %s on line %d
test bold italic test
+
+Deprecated: stream_filter_append(): The string.strip_tags filter is deprecated in %s on line %d
test <b>bold</b> italic test
+
+Deprecated: stream_filter_append(): The string.strip_tags filter is deprecated in %s on line %d
test <b>bold</b> italic test