]> git.wh0rd.org - tt-rss.git/commitdiff
add workaround for languagedetect idiotic shit of some kind
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 13 Nov 2013 16:36:15 +0000 (20:36 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 13 Nov 2013 16:36:15 +0000 (20:36 +0400)
include/rssfuncs.php

index 43c02c7f4a1eb8baf0624e78cf365c74a3f02d9d..43d931fc8bf035c27cadd40497373a550acc8390 100644 (file)
 
                                        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);
                                        }