Skip to content
Snippets Groups Projects
Unverified Commit 19994e20 authored by snipe's avatar snipe Committed by GitHub
Browse files

Merge pull request #9774 from uberbrady/snipeit_restore_php73

Better debugging output, and remove non-PHP-7.3-compatible option
parents 868419b3 102591b0
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment