mirror of
https://github.com/php/php-src.git
synced 2025-01-09 12:34:14 +08:00
add safeguard check for timestamp modification to phar_stub.phpt and phar_gzip.phpt
This commit is contained in:
parent
1ff3b85d74
commit
26ce51d6f1
@ -42,6 +42,11 @@ $a->setAlias('another');
|
||||
$b = new Phar($fname2);
|
||||
var_dump($b->isFileFormat(Phar::PHAR));
|
||||
var_dump($b->isCompressed() == Phar::GZ);
|
||||
$a = stat($pname . '/test');
|
||||
$b = stat($pname2 . '/test');
|
||||
if ($a['mtime'] != $b['mtime']) {
|
||||
echo "timestamp changed, was $a[mtime], now $b[mtime]!\n";
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
|
@ -19,6 +19,12 @@ $p['b'] = 'b';
|
||||
$p['c'] = 'c';
|
||||
copy($fname2, $fname);
|
||||
|
||||
$a = stat($pname . '/a');
|
||||
$b = stat($pname2 . '/a');
|
||||
if ($a['mtime'] != $b['mtime']) {
|
||||
echo "timestamp changed, was $a[mtime], now $b[mtime]!\n";
|
||||
}
|
||||
|
||||
$phar = new Phar($fname);
|
||||
echo $phar->getStub();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user