From: Greg Beaver Date: Sun, 1 Mar 2009 07:16:46 +0000 (+0000) Subject: add safeguard check for timestamp modification to phar_stub.phpt and phar_gzip.phpt X-Git-Tag: RELEASE_1_3_5~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26ce51d6f19af1a285b3d3f32e92cdf8cf86ab72;p=php add safeguard check for timestamp modification to phar_stub.phpt and phar_gzip.phpt --- diff --git a/ext/phar/tests/phar_gzip.phpt b/ext/phar/tests/phar_gzip.phpt index 99ff22d7bc..c722834ba6 100644 --- a/ext/phar/tests/phar_gzip.phpt +++ b/ext/phar/tests/phar_gzip.phpt @@ -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-- diff --git a/ext/phar/tests/zip/phar_stub.phpt b/ext/phar/tests/zip/phar_stub.phpt index 72c1f17d78..302a894d76 100644 --- a/ext/phar/tests/zip/phar_stub.phpt +++ b/ext/phar/tests/zip/phar_stub.phpt @@ -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();