diff --git a/ext/standard/html.c b/ext/standard/html.c
index fb785e42d1a..8a32b3bfd89 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -1135,9 +1135,7 @@ PHPAPI char *php_escape_html_entities_ex(unsigned char *old, int oldlen, int *ne
if(status == FAILURE) {
/* invalid MB sequence */
efree(replaced);
- if(!PG(display_errors)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid multibyte sequence in argument");
- }
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid multibyte sequence in argument");
*newlen = 0;
return STR_EMPTY_ALLOC();
}