X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fitem.php;h=f43e78e6ba35fe32c89cda0e010fabbf50189e70;hb=24c32cff0dcd38d5aa509208f5f17abb05a8b140;hp=ca97f4e0018f76349536be452c3d99d7fed17678;hpb=900e0d46d3c979a543366f7e6df8fc65c58d41a3;p=friendica.git diff --git a/mod/item.php b/mod/item.php index ca97f4e001..f43e78e6ba 100644 --- a/mod/item.php +++ b/mod/item.php @@ -156,7 +156,7 @@ function item_insert(int $uid, array $request, bool $preview, string $return_pat if (!empty($request['parent'])) { $parent_item = Post::selectFirst(Item::ITEM_FIELDLIST, ['id' => $request['parent']]); - if (DBA::isResult($parent_item)) { + if ($parent_item) { // if this isn't the top-level parent of the conversation, find it if ($parent_item['gravity'] != Item::GRAVITY_PARENT) { $toplevel_item = Post::selectFirst(Item::ITEM_FIELDLIST, ['id' => $parent_item['parent']]); @@ -206,7 +206,7 @@ function item_insert(int $uid, array $request, bool $preview, string $return_pat } $post = Post::selectFirst(Item::ITEM_FIELDLIST, ['id' => $post_id]); - if (!DBA::isResult($post)) { + if (!$post) { Logger::error('Item couldn\'t be fetched.', ['post_id' => $post_id]); if ($return_path) { DI::baseUrl()->redirect($return_path);