diff options
author | Greg Beaver <cellog@php.net> | 2008-09-30 02:40:37 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2008-09-30 02:40:37 +0000 |
commit | d86427434a97896465bc50fc808a7de341913fc4 (patch) | |
tree | df6176350998efd8f8addf81c23df27a23243f4e /ext/phar/phar.c | |
parent | a82ec0b5256b98f0c13b200e19c7da5da826e74a (diff) | |
download | php-git-d86427434a97896465bc50fc808a7de341913fc4.tar.gz |
MFB: fix Bug #46194: SIGSEGV when requested file is not found
Diffstat (limited to 'ext/phar/phar.c')
-rw-r--r-- | ext/phar/phar.c | 3 |
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) { |