diff --git a/functions.inc.php b/functions.inc.php index 5191199..812efd5 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'])) { @@ -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; }