Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: main/main.c
- ===================================================================
- --- main/main.c (revision 312542)
- +++ main/main.c (working copy)
- @@ -906,6 +906,29 @@
- PG(last_error_lineno) = error_lineno;
- }
- + /* change response status for fatal errors */
- + if (module_initialized) {
- + switch (type) {
- + case E_CORE_ERROR:
- + case E_ERROR:
- + case E_RECOVERABLE_ERROR:
- + case E_PARSE:
- + case E_COMPILE_ERROR:
- + case E_USER_ERROR:
- + if (!PG(display_errors) &&
- + !SG(headers_sent) &&
- + SG(sapi_headers).http_response_code == 200
- + ) {
- + sapi_header_line ctr = {0};
- +
- + ctr.line = "HTTP/1.0 500 Internal Server Error";
- + ctr.line_len = sizeof("HTTP/1.0 500 Internal Server Error") - 1;
- + sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
- + }
- + break;
- + }
- + }
- +
- /* according to error handling mode, suppress error, throw exception or show it */
- if (EG(error_handling) != EH_NORMAL) {
- switch (type) {
- @@ -1057,16 +1080,6 @@
- case E_USER_ERROR:
- EG(exit_status) = 255;
- if (module_initialized) {
- - if (!PG(display_errors) &&
- - !SG(headers_sent) &&
- - SG(sapi_headers).http_response_code == 200
- - ) {
- - sapi_header_line ctr = {0};
- -
- - ctr.line = "HTTP/1.0 500 Internal Server Error";
- - ctr.line_len = sizeof("HTTP/1.0 500 Internal Server Error") - 1;
- - sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
- - }
- /* the parser would return 1 (failure), we can bail out nicely */
- if (type == E_PARSE) {
- CG(parse_error) = 0;
Add Comment
Please, Sign In to add comment