From 102591b009d254b100278326aaaaf524c888b79f Mon Sep 17 00:00:00 2001
From: Brady Wetherington <bwetherington@grokability.com>
Date: Wed, 30 Jun 2021 14:53:08 -0700
Subject: [PATCH] Better debugging output, and remove non-PHP-7.3-compatible
 option

---
 app/Console/Commands/RestoreFromBackup.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/Console/Commands/RestoreFromBackup.php b/app/Console/Commands/RestoreFromBackup.php
index b59eceacc..06c99ec08 100644
--- a/app/Console/Commands/RestoreFromBackup.php
+++ b/app/Console/Commands/RestoreFromBackup.php
@@ -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) {
-- 
GitLab