diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 4c0b610d46..f6c4f947ed 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -272,7 +272,7 @@ function prune_deadguys($arr) { $r = q("SELECT `id` FROM `contact` WHERE `id` IN ( " . $str . ") AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 "); - if ($r) { + if (dbm::is_result($r)) { $ret = array(); foreach ($r as $rr) { $ret[] = intval($rr['id']); @@ -585,9 +585,9 @@ function acl_lookup(&$a, $out_type = 'json') { ); echo json_encode($o); killme(); - } - else + } else { $r = array(); + } if (dbm::is_result($r)) { diff --git a/include/message.php b/include/message.php index 3d5d4d33ab..5bd611f220 100644 --- a/include/message.php +++ b/include/message.php @@ -153,7 +153,8 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){ if ($post_id) { proc_run(PRIORITY_HIGH, "include/notifier.php", "mail", $post_id); return intval($post_id); - } else { + } + else { return -3; }