diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 9e8d8d1b8a418..b7e3e5fa1be2a 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -2026,7 +2026,7 @@ static zend_result php_cli_server_send_error_page(php_cli_server *server, php_cl
escaped_request_uri = php_escape_html_entities_ex((const unsigned char *) ZSTR_VAL(client->request.request_uri), ZSTR_LEN(client->request.request_uri), 0, ENT_QUOTES, NULL, /* double_encode */ 0, /* quiet */ 0);
{
- static const char prologue_template[] = "
%d %s";
+ static const char prologue_template[] = "%d %s";
php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new_self_contained(strlen(prologue_template) + 3 + strlen(status_string) + 1);
if (!chunk) {
goto fail;
diff --git a/sapi/cli/tests/php_cli_server_013.phpt b/sapi/cli/tests/php_cli_server_013.phpt
index fb334206908a1..ab898a402f942 100644
--- a/sapi/cli/tests/php_cli_server_013.phpt
+++ b/sapi/cli/tests/php_cli_server_013.phpt
@@ -131,7 +131,7 @@ X-Powered-By: PHP/%s
Content-Type: text/html; charset=UTF-8
Content-Length: %d
-404 Not Found
+404 Not Found
Not Found
The requested resource /
was not found on this server.
HTTP/1.1 404 Not Found
Host: %s
@@ -141,7 +141,7 @@ X-Powered-By: PHP/%s
Content-Type: text/html; charset=UTF-8
Content-Length: %d
-404 Not Found
+404 Not Found
Not Found
The requested resource /main/style.css
was not found on this server.
HTTP/1.1 404 Not Found
Host: %s
@@ -161,7 +161,7 @@ Content-Type: text/html; charset=UTF-8
Content-Length: %d
Allow: GET, HEAD, POST
-405 Method Not Allowed
+405 Method Not Allowed
Method Not Allowed
Requested method not allowed.
HTTP/1.1 405 Method Not Allowed
Host: %s
@@ -172,7 +172,7 @@ Content-Type: text/html; charset=UTF-8
Content-Length: %d
Allow: GET, HEAD, POST
-405 Method Not Allowed
+405 Method Not Allowed
Method Not Allowed
Requested method not allowed.
HTTP/1.1 405 Method Not Allowed
Host: %s
@@ -183,5 +183,5 @@ Content-Type: text/html; charset=UTF-8
Content-Length: %d
Allow: GET, HEAD, POST
-405 Method Not Allowed
+405 Method Not Allowed
Method Not Allowed
Requested method not allowed.