mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Better debugging output, and remove non-PHP-7.3-compatible option
This commit is contained in:
parent
868419b35b
commit
102591b009
|
@ -61,7 +61,7 @@ class RestoreFromBackup extends Command
|
|||
|
||||
$za = new ZipArchive();
|
||||
|
||||
$errcode = $za->open($filename, ZipArchive::RDONLY);
|
||||
$errcode = $za->open($filename/* , ZipArchive::RDONLY */); // that constant only exists in PHP 7.4 and higher
|
||||
if ($errcode !== true) {
|
||||
$errors = [
|
||||
ZipArchive::ER_EXISTS => "File already exists.",
|
||||
|
@ -248,8 +248,13 @@ class RestoreFromBackup extends Command
|
|||
}
|
||||
fclose($pipes[0]);
|
||||
fclose($sql_contents);
|
||||
|
||||
$this->line(stream_get_contents($pipes[1]));
|
||||
fclose($pipes[1]);
|
||||
|
||||
$this->error(stream_get_contents($pipes[2]));
|
||||
fclose($pipes[2]);
|
||||
|
||||
//wait, have to do fclose() on all pipes first?
|
||||
$close_results = proc_close($proc_results);
|
||||
if($close_results != 0) {
|
||||
|
|
Loading…
Reference in a new issue