// Set this so that the conversation function can find out contact info for our wall-wall items
$a->page_contact = $a->contact;
- $items = (empty($items) ? [] : $items);
+ if (!is_array($items)){
+ Logger::log("Expecting items to be an array. Got " . print_r($items, true));
+ $items = [];
+ }
+
$o = conversation($a, $items, $pager, $mode, $update, false, $ordering, local_user());
if (!$update) {
$o = networkThreadedView($a, $update, $parent);
}
+ if ($o === ''){
+ info("No items found");
+ }
+
return $o;
}
}
DBA::close($result);
+ if (count($posts) == 0){
+ return '';
+ }
$condition = ['uid' => local_user(), 'id' => $posts];
} else {
$condition = ['uid' => local_user()];
return false;
}
- $fields = ['file' => str_replace($pattern, null, $item['file'])];
+ $fields = ['file' => str_replace($pattern, '', $item['file'])];
+ if ($fields === '') {
+ $fields = null;
+ }
+
Item::update($fields, ['id' => $item_id]);
$r = q("SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d",