Skip to content

Commit

Permalink
setup bug
Browse files Browse the repository at this point in the history
  • Loading branch information
abrookbanks committed Jan 3, 2023
1 parent 13673ed commit 5a83506
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/language.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ class Language

final protected function __construct()
{
$d = array();
if($cache && $GLOBALS['cache']->exists('lang.domain.list')) {
$d = $GLOBALS['cache']->read('lang.domain.list');
} else {
} elseif(isset($GLOBALS['db']) && method_exists($GLOBALS['db'],'select')) {
if($domains = $GLOBALS['db']->select('CubeCart_domains')) {
foreach($domains as $domain) {
$d[$domain['domain']] = $domain['language'];
Expand Down Expand Up @@ -721,7 +722,7 @@ public function listLanguages($cache = true)
//Get all langauge files
if (($files = glob(CC_LANGUAGE_DIR.'*.{xml,gz}', GLOB_BRACE)) !== false) {
$d = array();
if($domains = $GLOBALS['db']->select('CubeCart_domains')) {
if(isset($GLOBALS['db']) && method_exists($GLOBALS['db'],'select') && $domains = $GLOBALS['db']->select('CubeCart_domains')) {
foreach($domains as $domain) {
$d[$domain['language']] = $domain['domain'];
}
Expand Down

0 comments on commit 5a83506

Please sign in to comment.