From 3e065fdbfb1583b15cd2673a4f35148c3e838bd2 Mon Sep 17 00:00:00 2001 From: Javier Pastor Date: Sun, 28 Jul 2024 08:42:46 +0200 Subject: [PATCH 1/2] fix error PHP Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in functions.inc.php on line 244 --- functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.inc.php b/functions.inc.php index 5191199..174aa1a 100755 --- a/functions.inc.php +++ b/functions.inc.php @@ -241,7 +241,7 @@ function PMBP_print_footer() $ping_res = PMBP_is_connected(); if ($ping_res) { if (isset($CONF['sql_host_s'])) { - $mode = $_SESSION['multi_user_mode'] ? 'm' : 's'+count($CONF['sql_host_s']) ? 'm' : 's'; + $mode = $_SESSION['multi_user_mode'] ? 'm' : ('s'+count($CONF['sql_host_s']) ? 'm' : 's'); } @set_time_limit("5"); if (isset($PMBP_SYS_VAR['security_key'])) { From cf70475d94900137642c098d9ff10402b1015047 Mon Sep 17 00:00:00 2001 From: Javier Pastor Date: Sun, 28 Jul 2024 10:34:29 +0200 Subject: [PATCH 2/2] fix error PHP Fatal error: Uncaught TypeError: gzclose(): Argument #1 ($stream) must be of type resource, null given in functions.inc.php:1818\nStack trace:\n#0 functions.inc.php(1818): gzclose()\n#1 get_file.php(55): PMBP_getln()\n#2 {main}\n thrown in functions.inc.php on line 1818, referer: http://phpmybackuppro/import.php --- functions.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.inc.php b/functions.inc.php index 174aa1a..812efd5 100755 --- a/functions.inc.php +++ b/functions.inc.php @@ -1815,7 +1815,9 @@ function PMBP_getln($path, $close = false, $org_path = false) if ($close) { // remove the file handler - @gzclose($GLOBALS['lnFile']); + if (is_resource($GLOBALS['lnFile'])) { + @gzclose($GLOBALS['lnFile']); + } $GLOBALS['lnFile'] = null; return null; }