diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-07 15:46:08 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-07 15:46:08 +0200 |
commit | c50cfc4d3d60e69040c9d2f3836b12e886b587ac (patch) | |
tree | 3998a9c64bdfadac5be8ab22f49695c43d47112d /sapi/fpm | |
parent | d6ac8b236f9ffb120562b5d23dfcac833182063c (diff) | |
download | php-git-c50cfc4d3d60e69040c9d2f3836b12e886b587ac.tar.gz |
Add quiet parameter to internal HTML entities API
In some places, we need to make sure that no warnings are thrown
due to unknown encoding. The error reporting code tried to avoid
this by determining a "safe charset", but this introduces subtle
discrepancies in which charset is picked (normally
internal_encoding takes precedence). Avoid this by suppressing
the warning in the first place.
While here, use the fallback logic to print error messages with
substitution characters more consistently, to avoid skipping
parts of the error message entirely.
Diffstat (limited to 'sapi/fpm')
-rw-r--r-- | sapi/fpm/fpm/fpm_status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/fpm/fpm/fpm_status.c b/sapi/fpm/fpm/fpm_status.c index 36d2240635..2e4fff937a 100644 --- a/sapi/fpm/fpm/fpm_status.c +++ b/sapi/fpm/fpm/fpm_status.c @@ -517,7 +517,7 @@ int fpm_status_handle_request(void) /* {{{ */ if (!encode) { query_string = proc.query_string; } else { - tmp_query_string = php_escape_html_entities_ex((unsigned char *)proc.query_string, strlen(proc.query_string), 1, ENT_HTML_IGNORE_ERRORS & ENT_COMPAT, NULL, 1); + tmp_query_string = php_escape_html_entities_ex((unsigned char *)proc.query_string, strlen(proc.query_string), 1, ENT_HTML_IGNORE_ERRORS & ENT_COMPAT, NULL, /* double_encode */ 1, /* quiet */ 0); query_string = ZSTR_VAL(tmp_query_string); } } |