X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwall_attach.php;h=152efb5f1f1905778221fe7aeff2bf5272ebca67;hb=6a8a36f12d00f35004fbb034972ca87dd1a3c4f5;hp=15e3d3f75e2384f8a8030e31d88c58f2280fb3f2;hpb=293436e5fd5110220c969513858dbb979f1f35d3;p=friendica.git diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 15e3d3f75e..152efb5f1f 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -12,7 +12,7 @@ function wall_attach_post(&$a) { $r = q("SELECT `user`.*, `contact`.`id` FROM `user` LEFT JOIN `contact` on `user`.`uid` = `contact`.`uid` WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0 and `contact`.`self` = 1 LIMIT 1", dbesc($nick) ); - if(! count($r)){ + if(! dbm::is_result($r)){ if ($r_json) { echo json_encode(array('error'=>t('Invalid request.'))); killme(); @@ -55,7 +55,7 @@ function wall_attach_post(&$a) { intval($contact_id), intval($page_owner_uid) ); - if(count($r)) { + if(dbm::is_result($r)) { $can_post = true; $visitor = $contact_id; } @@ -168,7 +168,7 @@ function wall_attach_post(&$a) { dbesc($hash) ); - if(! count($r)) { + if(! dbm::is_result($r)) { $msg = t('File upload failed.'); if ($r_json) { echo json_encode(array('error'=>$msg));