summaryrefslogtreecommitdiff
path: root/main/main.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-05-29 17:27:51 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-06-05 09:46:39 +0200
commite949f306be9e7d54a700cccd5b9af9711615b43f (patch)
tree7b2d1e8b616edfd87e18538769f862ade8a58cdf /main/main.c
parent4ce47709c748f912849fac2b0c157a3274e27197 (diff)
downloadphp-git-e949f306be9e7d54a700cccd5b9af9711615b43f.tar.gz
Fixed bug #72089: Throw Error on require failure
It should be noted that we still throw the usual fopen warnings, but the final fatal error becomes an Error exception. Combine with @ to suppress FS warnings. Closes GH-5641.
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/main.c b/main/main.c
index 1cb78dbc0f..7549de3d54 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1618,7 +1618,7 @@ static ZEND_COLD void php_message_handler_for_zend(zend_long message, const void
php_error_docref("function.include", E_WARNING, "Failed opening '%s' for inclusion (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
break;
case ZMSG_FAILED_REQUIRE_FOPEN:
- php_error_docref("function.require", E_COMPILE_ERROR, "Failed opening required '%s' (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
+ zend_throw_error(NULL, "Failed opening required '%s' (include_path='%s')", php_strip_url_passwd((char *) data), STR_PRINT(PG(include_path)));
break;
case ZMSG_FAILED_HIGHLIGHT_FOPEN:
php_error_docref(NULL, E_WARNING, "Failed opening '%s' for highlighting", php_strip_url_passwd((char *) data));