From 4a5b2101e51b6be68e2bcb40f2ad6d846db1bdd8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 5 Jul 2018 21:27:17 +0200 Subject: [PATCH] Deprecate string.strip_tags filter Part of https://wiki.php.net/rfc/deprecations_php_7_3. --- ext/standard/filters.c | 2 ++ ext/standard/tests/filters/strip_tags_filter.phpt | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/standard/filters.c b/ext/standard/filters.c index f738ecf762..b5a8bdab2d 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 038545ae6d..f353e79a9a 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 bold italic 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 bold italic test + +Deprecated: stream_filter_append(): The string.strip_tags filter is deprecated in %s on line %d test bold italic test -- 2.40.0