summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2008-09-30 02:40:17 +0000
committerGreg Beaver <cellog@php.net>2008-09-30 02:40:17 +0000
commitdcc919c44917f01d03e362a8ba34ebaed9e0180b (patch)
treeebb68ba26b35dcb1f28e7bec8164b0d244128fc2
parentf0cf9b4c885c06fd054c3c71f26e9ae9838302e3 (diff)
downloadphp-git-dcc919c44917f01d03e362a8ba34ebaed9e0180b.tar.gz
fix Bug #46194: SIGSEGV when requested file is not found
-rw-r--r--ext/phar/phar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 0065367bb9..7ae4af4f26 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -3291,6 +3291,9 @@ static zend_op_array *phar_compile_file(zend_file_handle *file_handle, int type
int failed;
phar_archive_data *phar;
+ if (!file_handle || !file_handle->filename) {
+ return phar_orig_compile_file(file_handle, type TSRMLS_CC);
+ }
if (strstr(file_handle->filename, ".phar") && !strstr(file_handle->filename, "://")) {
if (SUCCESS == phar_open_from_filename(file_handle->filename, strlen(file_handle->filename), NULL, 0, 0, &phar, NULL TSRMLS_CC)) {
if (phar->is_zip || phar->is_tar) {