}
}
- if (php_strip_tags_filter_ctor(inst, ZSTR_VAL(tags_ss.s), ZSTR_LEN(tags_ss.s), persistent) != SUCCESS) {
- smart_str_free(&tags_ss);
+ if (php_strip_tags_filter_ctor(inst, allowed_tags, persistent) == SUCCESS) {
+ filter = php_stream_filter_alloc(&strfilter_strip_tags_ops, inst, persistent);
+ } else {
pefree(inst, persistent);
- return NULL;
}
- smart_str_free(&tags_ss);
+ if (allowed_tags) {
+ zend_string_release(allowed_tags);
+ }
- return php_stream_filter_alloc(&strfilter_strip_tags_ops, inst, persistent);
+ return filter;
}
-static php_stream_filter_factory strfilter_strip_tags_factory = {
+static const php_stream_filter_factory strfilter_strip_tags_factory = {
strfilter_strip_tags_create
};