add workaround for languagedetect idiotic shit of some kind

This commit is contained in:
Andrew Dolgov 2013-11-13 20:36:15 +04:00
parent 8384af6cc1
commit 5a450b8760
1 changed files with 6 additions and 1 deletions

View File

@ -599,7 +599,12 @@
if (count($entry_language) > 0) {
$entry_language = array_keys($entry_language);
$entry_language = db_escape_string(substr($entry_language[0], 0, 2));
// the fuck?
if (is_array($entry_language))
$entry_language = "";
else
$entry_language = db_escape_string(substr($entry_language[0], 0, 2));
_debug("detected language: $entry_language", $debug_enabled);
}