diff options
Diffstat (limited to 'ext/standard/string.c')
| -rw-r--r-- | ext/standard/string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index c01259b85e..fec8b70934 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4159,7 +4159,7 @@ PHP_FUNCTION(strip_tags) if (allow != NULL) { convert_to_string_ex(allow); // TODO: reimplement to avoid reallocation ??? - if (IS_INTERNED(Z_STR_P(allow))) { + if (!Z_REFCOUNTED_P(allow)) { allowed_tags = estrndup(Z_STRVAL_P(allow), Z_STRLEN_P(allow)); allowed_tags_len = Z_STRLEN_P(allow); } else { @@ -4172,7 +4172,7 @@ PHP_FUNCTION(strip_tags) buf->len = php_strip_tags_ex(buf->val, str->len, NULL, allowed_tags, allowed_tags_len, 0); // TODO: reimplement to avoid reallocation ??? - if (allow && IS_INTERNED(Z_STR_P(allow))) { + if (allow && !Z_REFCOUNTED_P(allow)) { efree(allowed_tags); } RETURN_STR(buf); |
