Only check phar validity if phar.readonly is false
parent
ab4ecb9471
commit
3251f9f1aa
|
@ -174,17 +174,18 @@ EOT
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@chmod($newFilename, 0777 & ~umask());
|
@chmod($newFilename, 0777 & ~umask());
|
||||||
|
if (!ini_get('phar.readonly')) {
|
||||||
// test the phar validity
|
// test the phar validity
|
||||||
$phar = new \Phar($newFilename);
|
$phar = new \Phar($newFilename);
|
||||||
// free the variable to unlock the file
|
// free the variable to unlock the file
|
||||||
unset($phar);
|
unset($phar);
|
||||||
|
}
|
||||||
|
|
||||||
// copy current file into installations dir
|
// copy current file into installations dir
|
||||||
if ($backupTarget && file_exists($localFilename)) {
|
if ($backupTarget && file_exists($localFilename)) {
|
||||||
@copy($localFilename, $backupTarget);
|
@copy($localFilename, $backupTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($phar);
|
|
||||||
rename($newFilename, $localFilename);
|
rename($newFilename, $localFilename);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if ($backupTarget) {
|
if ($backupTarget) {
|
||||||
|
|
Loading…
Reference in New Issue