]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix handling of rss author field
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 1 Feb 2007 05:23:00 +0000 (06:23 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 1 Feb 2007 05:23:00 +0000 (06:23 +0100)
functions.php

index 7d16c2586902c6a0acd9ae82f15cf72a014eac8b..0b69fb8de71f486a7af652a24bb5b03d87259cfe 100644 (file)
                                $entry_author = db_escape_string(strip_tags($item['dc']['creator']));
 
                                if ($item['author']) {
-                                       if (!$entry_author) {
-                                               $entry_author = db_escape_string(strip_tags($item['author']['name']));
-                                       }
 
-                                       if (!$entry_author) {
-                                               $entry_author = db_escape_string(strip_tags($item['author']['email']));
+                                       if (is_array($item['author'])) {
+
+                                               if (!$entry_author) {
+                                                       $entry_author = db_escape_string(strip_tags($item['author']['name']));
+                                               }
+
+                                               if (!$entry_author) {
+                                                       $entry_author = db_escape_string(strip_tags($item['author']['email']));
+                                               }
                                        }
 
                                        if (!$entry_author) {