Closed
Description
Description
The following code:
<?php
$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php';
$file = '<?php __HALT_COMPILER(); ?>';
$files['b'] = 'b';
$files['c'] = 'c';
include 'files/phar_test.inc';
$phar = new Phar($fname);
$phar->compressFiles(Phar::GZ);
$phar = $phar->convertToExecutable(Phar::TAR);
$phar = $phar->convertToExecutable(Phar::PHAR, Phar::GZ);
Resulted in this output:
php-src/ext/phar/phar.c:2808: void phar_flush_ex(phar_archive_data *, zend_string *, _Bool, char **): Assertion `entry->header_offset == 0' failed.
Aborted (core dumped)
To reproduce:
-d "phar.require_hash=0" -d "phar.readonly=0"
PHP Version
nightly
Operating System
ubuntu 22.04