From 1dc395c8c45a6b5f69eff8319cd8b9a1b0a88894 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 5 Jan 2016 20:03:05 +0100 Subject: [PATCH] improve fix for bug #71273 --- main/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/main.c b/main/main.c index bc978d9ae3..77a2f64b40 100644 --- a/main/main.c +++ b/main/main.c @@ -724,7 +724,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ if (PG(html_errors)) { replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, NULL); /* Retry with substituting invalid chars on fail. */ - if (!replace_buffer) { + if (!replace_buffer || ZSTR_LEN(replace_buffer) < 1) { replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT | ENT_HTML_SUBSTITUTE_ERRORS, NULL); } -- 2.40.0