From: Nikita Popov Date: Thu, 5 Jul 2018 19:27:17 +0000 (+0200) Subject: Deprecate string.strip_tags filter X-Git-Tag: php-7.3.0beta1~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a5b2101e51b6be68e2bcb40f2ad6d846db1bdd8;p=php Deprecate string.strip_tags filter Part of https://wiki.php.net/rfc/deprecations_php_7_3. --- 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