invalid arguments for a foreach loop found

This commit is contained in:
Tobias Diekershoff 2013-04-17 17:32:31 +02:00
parent 7be1040a63
commit 960d1d99b2

View File

@ -106,9 +106,11 @@ function create_tags_from_item($itemid) {
function create_tags_from_itemuri($itemuri, $uid) { function create_tags_from_itemuri($itemuri, $uid) {
$messages = q("SELECT `id` FROM `item` WHERE uri ='%s' AND uid=%d", dbesc($itemuri), intval($uid)); $messages = q("SELECT `id` FROM `item` WHERE uri ='%s' AND uid=%d", dbesc($itemuri), intval($uid));
if(count($messages)) {
foreach ($messages as $message) foreach ($messages as $message)
create_tags_from_item($message["id"]); create_tags_from_item($message["id"]);
} }
}
function update_items() { function update_items() {
//$messages = q("SELECT `id` FROM `item` where tag !='' ORDER BY `created` DESC limit 10"); //$messages = q("SELECT `id` FROM `item` where tag !='' ORDER BY `created` DESC limit 10");