mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
fix Bug #46194: SIGSEGV when requested file is not found
This commit is contained in:
parent
f0cf9b4c88
commit
dcc919c449
1 changed files with 3 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue