summaryrefslogtreecommitdiff
path: root/main/fopen_wrappers.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-12-30 22:57:07 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-12-30 22:57:07 +0100
commitd5c886ab7deef065c8119aaa545332041f13fe18 (patch)
treebb33dc724d134c05e69d30c03d71d0aab8255349 /main/fopen_wrappers.c
parent48b44612d4e3f2201aa3d069aedb89df7e0d1668 (diff)
parentf77747b06c7623c4f673c75aebbe3372411a4275 (diff)
downloadphp-git-d5c886ab7deef065c8119aaa545332041f13fe18.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Properly propagate url_stat exceptions during include
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r--main/fopen_wrappers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 294926e7af..03e09738f3 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -559,6 +559,9 @@ PHPAPI zend_string *php_resolve_path(const char *filename, size_t filename_lengt
if (SUCCESS == wrapper->wops->url_stat(wrapper, trypath, 0, &ssb, NULL)) {
return zend_string_init(trypath, strlen(trypath), 0);
}
+ if (EG(exception)) {
+ return NULL;
+ }
}
continue;
}
@@ -596,6 +599,9 @@ PHPAPI zend_string *php_resolve_path(const char *filename, size_t filename_lengt
if (SUCCESS == wrapper->wops->url_stat(wrapper, trypath, 0, &ssb, NULL)) {
return zend_string_init(trypath, strlen(trypath), 0);
}
+ if (EG(exception)) {
+ return NULL;
+ }
}
return NULL;
}