]> git.mxchange.org Git - friendica.git/commitdiff
invalid arguments for a foreach loop found
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Wed, 17 Apr 2013 15:32:31 +0000 (17:32 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Wed, 17 Apr 2013 15:32:31 +0000 (17:32 +0200)
include/tags.php

index c81a752d544ce2bb66947391982b41b47a9b8cb6..6e73f616cb82100fe60065d584f912230fe05273 100644 (file)
@@ -106,8 +106,10 @@ function create_tags_from_item($itemid) {
 function create_tags_from_itemuri($itemuri, $uid) {
        $messages = q("SELECT `id` FROM `item` WHERE uri ='%s' AND uid=%d", dbesc($itemuri), intval($uid));
 
-       foreach ($messages as $message)
-               create_tags_from_item($message["id"]);
+       if(count($messages)) {
+               foreach ($messages as $message)
+                       create_tags_from_item($message["id"]);
+       }
 }
 
 function update_items() {