mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
- Prevent phars with empty manifests flushing to disk
- This would've fixed that test... removing clean section @Greg: I commented out the call that breaks the Windows build, pending a decision about its future.
This commit is contained in:
parent
7d3e9ef952
commit
8559a2dbde
3 changed files with 6 additions and 5 deletions
|
@ -2092,6 +2092,10 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert,
|
|||
return EOF;
|
||||
}
|
||||
|
||||
if (!zend_hash_num_elements(&phar->manifest)) {
|
||||
return EOF;
|
||||
}
|
||||
|
||||
if (phar->is_zip) {
|
||||
return phar_zip_flush(phar, user_stub, len, convert, error TSRMLS_CC);
|
||||
}
|
||||
|
|
|
@ -320,9 +320,10 @@ static int phar_file_action(phar_entry_data *phar, char *mime_type, int code, ch
|
|||
if (EG(return_value_ptr_ptr) && *EG(return_value_ptr_ptr)) {
|
||||
zval_ptr_dtor(EG(return_value_ptr_ptr));
|
||||
}
|
||||
/*
|
||||
if (EG(exception)) {
|
||||
zend_throw_exception_internal(NULL TSRMLS_CC);
|
||||
}
|
||||
} */
|
||||
zend_bailout();
|
||||
}
|
||||
return PHAR_MIME_PHP;
|
||||
|
|
|
@ -143,10 +143,6 @@ echo $e->getMessage() . "\n";
|
|||
}
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(dirname(__FILE__) . '/whatever.tar');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Phar::mungServer() expects parameter 1 to be array, string given in %sbadparameters.php on line %d
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue