diff --git a/ext/imap/tests/bug46918.phpt b/ext/imap/tests/bug46918.phpt index 52e2fbf21a0ba..c62be631d52a9 100644 --- a/ext/imap/tests/bug46918.phpt +++ b/ext/imap/tests/bug46918.phpt @@ -68,4 +68,4 @@ array ( 'host' => '.SYNTAX-ERROR.', ), ) -Notice: Unknown: Unexpected characters at end of address: @two (errflg=3) in Unknown on line 0 +Notice: PHP Request Shutdown: Unexpected characters at end of address: @two (errflg=3) in Unknown on line 0 diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt index 965109db5e878..02ba0006e8c44 100644 --- a/ext/imap/tests/imap_open_error.phpt +++ b/ext/imap/tests/imap_open_error.phpt @@ -36,4 +36,4 @@ Warning: imap_open(): Couldn't open stream in %s on line %d imap_open(): Argument #4 ($flags) must be a bitmask of the OP_* constants, and CL_EXPUNGE imap_open(): Argument #5 ($retries) must be greater than or equal to 0 -Notice: Unknown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0 +Notice: PHP Request Shutdown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0 diff --git a/ext/mbstring/tests/bug63447_001.phpt b/ext/mbstring/tests/bug63447_001.phpt index 47a285d74bafa..12326acde8dfe 100644 --- a/ext/mbstring/tests/bug63447_001.phpt +++ b/ext/mbstring/tests/bug63447_001.phpt @@ -13,6 +13,6 @@ a=1&b=2&c=3&d=4&e=5&f=6 var_dump($_POST); ?> --EXPECT-- -Warning: Unknown: Input variables exceeded 5. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 +Warning: PHP Request Startup: Input variables exceeded 5. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 array(0) { } diff --git a/ext/mbstring/tests/bug63447_002.phpt b/ext/mbstring/tests/bug63447_002.phpt index 53a8c364074ac..859092178ec33 100644 --- a/ext/mbstring/tests/bug63447_002.phpt +++ b/ext/mbstring/tests/bug63447_002.phpt @@ -13,6 +13,6 @@ a=1&b=2&c=3&d=4&e=5 var_dump($_POST); ?> --EXPECT-- -Warning: Unknown: Input variables exceeded 4. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 +Warning: PHP Request Startup: Input variables exceeded 4. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 array(0) { } diff --git a/ext/session/tests/bug60634_error_3.phpt b/ext/session/tests/bug60634_error_3.phpt index 5669aa317882f..358f40118e27b 100644 --- a/ext/session/tests/bug60634_error_3.phpt +++ b/ext/session/tests/bug60634_error_3.phpt @@ -52,4 +52,4 @@ Stack trace: #1 {main} thrown in %s on line %d -Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0 +Warning: PHP Request Shutdown: Cannot call session save handler in a recursive manner in Unknown on line 0 diff --git a/ext/session/tests/bug60634_error_4.phpt b/ext/session/tests/bug60634_error_4.phpt index a8abedcab1833..f9eda46b69b1d 100644 --- a/ext/session/tests/bug60634_error_4.phpt +++ b/ext/session/tests/bug60634_error_4.phpt @@ -52,4 +52,4 @@ Stack trace: #1 {main} thrown in %s on line %d -Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0 +Warning: PHP Request Shutdown: Cannot call session save handler in a recursive manner in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_invalid.phpt b/ext/session/tests/rfc1867_sid_invalid.phpt index 265883c96f1a6..fe01b5a8ba2aa 100644 --- a/ext/session/tests/rfc1867_sid_invalid.phpt +++ b/ext/session/tests/rfc1867_sid_invalid.phpt @@ -52,17 +52,17 @@ session_destroy(); @unlink(__DIR__ . DIRECTORY_SEPARATOR . "rfc1867_sid_invalid.post.txt"); ?> --EXPECTF-- -Warning: Unknown: Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0 +Warning: PHP Request Startup: Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0 -Warning: Unknown: Failed to read session data: files (path: ) in Unknown on line 0 +Warning: PHP Request Startup: Failed to read session data: files (path: ) in Unknown on line 0 -Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 +Warning: PHP Request Startup: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 -Warning: Unknown: Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0 +Warning: PHP Request Startup: Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0 -Warning: Unknown: Failed to read session data: files (path: ) in Unknown on line 0 +Warning: PHP Request Startup: Failed to read session data: files (path: ) in Unknown on line 0 -Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 +Warning: PHP Request Startup: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 string(%d) "" bool(true) array(2) { diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt b/ext/session/tests/session_set_save_handler_iface_002.phpt index 7f826190e319e..379b6138c663f 100644 --- a/ext/session/tests/session_set_save_handler_iface_002.phpt +++ b/ext/session/tests/session_set_save_handler_iface_002.phpt @@ -89,4 +89,4 @@ bool(true) session_set_save_handler(): Argument #1 ($open) must be of type SessionHandlerInterface, MySession2 given good handler writing -Deprecated: Unknown: Session callback must have a return value of type bool, int returned in Unknown on line 0 +Deprecated: PHP Request Shutdown: Session callback must have a return value of type bool, int returned in Unknown on line 0 diff --git a/main/main.c b/main/main.c index 933ab031dd8b5..30e05dc26a93c 100644 --- a/main/main.c +++ b/main/main.c @@ -965,6 +965,8 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ function = "PHP Startup"; } else if (php_during_module_shutdown()) { function = "PHP Shutdown"; + } else if (PG(during_request_startup)) { + function = "PHP Request Startup"; } else if (EG(current_execute_data) && EG(current_execute_data)->func && ZEND_USER_CODE(EG(current_execute_data)->func->common.type) && @@ -995,14 +997,13 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ default: function = "Unknown"; } + } else if ((function = get_active_function_name()) && strlen(function)) { + is_function = 1; + class_name = get_active_class_name(&space); + } else if (EG(flags) & EG_FLAGS_IN_SHUTDOWN) { + function = "PHP Request Shutdown"; } else { - function = get_active_function_name(); - if (!function || !strlen(function)) { - function = "Unknown"; - } else { - is_function = 1; - class_name = get_active_class_name(&space); - } + function = "Unknown"; } /* if we still have memory then format the origin */ diff --git a/sapi/cgi/tests/bug69487.phpt b/sapi/cgi/tests/bug69487.phpt index 59058809adf29..fcda1ac051b4b 100644 --- a/sapi/cgi/tests/bug69487.phpt +++ b/sapi/cgi/tests/bug69487.phpt @@ -11,8 +11,8 @@ var_dump(isset($_POST['foo'])); var_dump(strlen(file_get_contents('php://input'))); ?> --EXPECT-- -Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0 +Warning: PHP Request Startup: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0 -Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0 +Warning: PHP Request Startup: POST data can't be buffered; all data discarded in Unknown on line 0 bool(false) int(0) diff --git a/tests/basic/025.phpt b/tests/basic/025.phpt index 0d00afa36271b..6b7340a860905 100644 --- a/tests/basic/025.phpt +++ b/tests/basic/025.phpt @@ -11,7 +11,7 @@ a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa var_dump($_POST, $HTTP_RAW_POST_DATA); ?> --EXPECTF-- -Warning: Unknown: POST Content-Length of 2050 bytes exceeds the limit of 1024 bytes in Unknown on line 0 +Warning: PHP Request Startup: POST Content-Length of 2050 bytes exceeds the limit of 1024 bytes in Unknown on line 0 Warning: Undefined variable $HTTP_RAW_POST_DATA in %s on line %d array(0) {