From 9b84e0c07fae337757dd4d75d1947e36860b1916 Mon Sep 17 00:00:00 2001 From: k4be Date: Sun, 29 Oct 2023 14:38:46 +0100 Subject: Fix various theme issues with php8 Reported by PeGaSuS-Coder --- htdocs/application/libraries/Carabiner.php | 6 ++++-- htdocs/application/libraries/Jsmin.php | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/application/libraries/Carabiner.php b/htdocs/application/libraries/Carabiner.php index 6fbafe2..7480368 100644 --- a/htdocs/application/libraries/Carabiner.php +++ b/htdocs/application/libraries/Carabiner.php @@ -938,14 +938,16 @@ class Carabiner { private function _get_contents($ref) { + $contents = false; if( $this->isURL($ref) && ( ini_get('allow_url_fopen') == 0 || $this->force_curl ) ): $this->_load('curl'); $contents = $this->CI->curl->simple_get($ref); else: - - $contents = file_get_contents( $ref ); + if($ref){ + $contents = file_get_contents( $ref ); + } endif; diff --git a/htdocs/application/libraries/Jsmin.php b/htdocs/application/libraries/Jsmin.php index 620514f..8299b85 100644 --- a/htdocs/application/libraries/Jsmin.php +++ b/htdocs/application/libraries/Jsmin.php @@ -174,7 +174,7 @@ class JSMin { } protected function isAlphaNum($c) { - return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1; + return $c ? ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1 : false; } protected function min() { @@ -306,4 +306,4 @@ class JSMin { // -- Exceptions --------------------------------------------------------------- class JSMinException extends Exception {} -?> \ No newline at end of file +?> -- cgit v1.2.3