Skip to content

Commit e8036d2

Browse files
committed
Only check phar validity if phar.readonly is false
1 parent 5f82887 commit e8036d2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

web/installer

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,12 @@ function installComposer($version, $installDir, $filename, $quiet, $disableTls,
440440
} else {
441441
$pharFile = $file;
442442
}
443-
// test the phar validity
444-
$phar = new Phar($pharFile);
445-
// free the variable to unlock the file
446-
unset($phar);
443+
if (!ini_get('phar.readonly')) {
444+
// test the phar validity
445+
$phar = new Phar($pharFile);
446+
// free the variable to unlock the file
447+
unset($phar);
448+
}
447449
// clean up temp file if needed
448450
if ($file !== $pharFile) {
449451
unlink($pharFile);

0 commit comments

Comments
 (0)