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/cli | |
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/cli')
-rw-r--r-- | sapi/cli/php_cli_server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 1062c5b34c..dbee30700f 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -1978,7 +1978,7 @@ static int php_cli_server_send_error_page(php_cli_server *server, php_cli_server php_cli_server_content_sender_ctor(&client->content_sender); client->content_sender_initialized = 1; - escaped_request_uri = php_escape_html_entities_ex((unsigned char *)client->request.request_uri, client->request.request_uri_len, 0, ENT_QUOTES, NULL, 0); + escaped_request_uri = php_escape_html_entities_ex((unsigned char *)client->request.request_uri, client->request.request_uri_len, 0, ENT_QUOTES, NULL, /* double_encode */ 0, /* quiet */ 0); { static const char prologue_template[] = "<!doctype html><html><head><title>%d %s</title>"; |