diff --git a/common.php b/common.php index 66c689206..2d37ec68e 100644 --- a/common.php +++ b/common.php @@ -276,7 +276,7 @@ function clean_filename($fname) */ function str_compact($str) { - return preg_replace('#\s+#u', ' ', trim($str)); + return preg_replace('#\s+#u', ' ', trim($str ?? '')); } /** diff --git a/src/Legacy/SqlDb.php b/src/Legacy/SqlDb.php index 9696535b6..280778ccb 100644 --- a/src/Legacy/SqlDb.php +++ b/src/Legacy/SqlDb.php @@ -1012,7 +1012,7 @@ class SqlDb $this->explain_hold .= '