From 9814414b6a69da17a32977181cb83277528d4530 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 20 Dec 2016 21:39:06 +0100 Subject: [PATCH] used dbm::is_result() instead of count() Signed-off-by: Roland Haeder --- mod/item.php | 2 +- mod/lostpass.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/item.php b/mod/item.php index 2080bb1653..695e76a2fa 100644 --- a/mod/item.php +++ b/mod/item.php @@ -139,7 +139,7 @@ function item_post(App &$a) { // If the contact id doesn't fit with the contact, then set the contact to null $thrparent = q("SELECT `author-link`, `network` FROM `item` WHERE `uri` = '%s' LIMIT 1", dbesc($thr_parent)); - if (count($thrparent) AND ($thrparent[0]["network"] === NETWORK_OSTATUS) + if (dbm::is_result($thrparent) AND ($thrparent[0]["network"] === NETWORK_OSTATUS) AND (normalise_link($parent_contact["url"]) != normalise_link($thrparent[0]["author-link"]))) { $parent_contact = null; diff --git a/mod/lostpass.php b/mod/lostpass.php index 43e9cf715e..f9e9400fc2 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -102,6 +102,8 @@ function lostpass_content(App &$a) { dbesc($new_password_encoded), intval($uid) ); + + /// @TODO Is dbm::is_result() okay here? if ($r) { $tpl = get_markup_template('pwdreset.tpl'); $o .= replace_macros($tpl,array(