From a679cb4d6d5ddb03f41b8811441c1b374f929396 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 24 Sep 2005 19:10:03 +0000 Subject: [PATCH] r439: - fixed an error in build_language_cache() - only fetch_strings() if we have a language --- includes/language.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/language.php b/includes/language.php index f15e58d..3ea89ef 100644 --- a/includes/language.php +++ b/includes/language.php @@ -23,7 +23,7 @@ function build_language_cache($languageid) $bugsys->db->query("DELETE FROM localization WHERE languageid = $languageid"); - $localizations = fetch_strings($language['languageid'], true); + $localizations = fetch_strings($languageid, true); foreach ($localizations AS $key => $value) { $bugsys->db->query("INSERT INTO localization (localkey, localtext, languageid) VALUES ('" . $bugsys->escape($key) . "', '" . $bugsys->escape($value) . "', $languageid)"); @@ -39,6 +39,11 @@ function fetch_strings($languageid, $forcexml = false) $language =& $bugsys->datastore['language']["$languageid"]; $locals = array(); + + if (!$language['languageid']) + { + return; + } if ($language['debug'] OR $forcexml) { -- 2.43.5