diff --git a/locale/function.php b/locale/function.php index e9c6e67e6a..ea4f84e39d 100644 --- a/locale/function.php +++ b/locale/function.php @@ -11,7 +11,7 @@ includeLangFile(); function includeLangFile() { global $t, $global; - if(empty($_SESSION)){ + if(empty($_SESSION) && function_exists('_session_start')){ _session_start(); } if(empty($_SESSION['language'])){ diff --git a/objects/Object.php b/objects/Object.php index afbdcf8fd8..180d09f678 100644 --- a/objects/Object.php +++ b/objects/Object.php @@ -78,6 +78,9 @@ abstract class ObjectYPT implements ObjectInterface static function getFromDb($id, $refreshCache = false) { global $global; + if(!class_exists('sqlDAL')){ + return false; + } $id = intval($id); $sql = "SELECT * FROM " . static::getTableName() . " WHERE id = ? LIMIT 1"; //var_dump($sql, $id); @@ -416,6 +419,9 @@ abstract class ObjectYPT implements ObjectInterface private function getAllFields() { global $global, $mysqlDatabase; + if(!class_exists('sqlDAL')){ + return array(); + } $sql = "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = '" . static::getTableName() . "'"; $res = sqlDAL::readSql($sql, "s", [$mysqlDatabase]); $fullData = sqlDAL::fetchAllAssoc($res); @@ -1011,6 +1017,9 @@ abstract class ObjectYPT implements ObjectInterface public static function isTableInstalled($tableName = "") { global $global, $tableExists; + if(!class_exists('sqlDAL')){ + return false; + } if (empty($tableName)) { $tableName = static::getTableName(); } diff --git a/objects/functions.php b/objects/functions.php index 49015a9651..0df8f0dcc9 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -8852,7 +8852,7 @@ function getCDN($type = 'CDN', $id = 0) if ($type == 'CDN') { if (!empty($global['ignoreCDN'])) { return $global['webSiteRootURL']; - } elseif (!empty($advancedCustom) && isValidURL($advancedCustom->videosCDN)) { + } elseif (!empty($advancedCustom) && !empty($advancedCustom->videosCDN) && isValidURL($advancedCustom->videosCDN)) { $_getCDNURL[$index] = addLastSlash($advancedCustom->videosCDN); } elseif (empty($_getCDNURL[$index])) { $_getCDNURL[$index] = $global['webSiteRootURL']; diff --git a/objects/include_config.php b/objects/include_config.php index c0c1ebe3d0..09128c8f12 100644 --- a/objects/include_config.php +++ b/objects/include_config.php @@ -1,5 +1,7 @@