1
0
mirror of https://github.com/php/php-src.git synced 2026-04-13 02:52:48 +02:00

Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Fix TSRM signature - php_stream_stat macro has it's own TSRM
  Regenerate certificates for openssl tests
  Improve test for bug77022
This commit is contained in:
Stanislav Malyshev
2018-12-02 15:12:15 -08:00

View File

@@ -1,7 +1,10 @@
--TEST--
Phar: Bug #77022: PharData always creates new files with mode 0666
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php
if (!extension_loaded("phar")) die("skip");
if (defined("PHP_WINDOWS_VERSION_MAJOR")) die("skip not for Windows")
?>
--FILE--
<?php
umask(022);
@@ -11,6 +14,7 @@ $sFile = tempnam(__DIR__, 'test77022');
var_dump(decoct(stat($sFile)['mode']));
foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
clearstatcache();
$phar = new PharData(__DIR__ . '/test77022.' . $ext, null, null, $mode);
$phar->addFile($sFile, 'test-file-phar');
$phar->addFromString("test-from-string", 'test-file-phar');