From afb29176a4e301d4e4b247e0d28084e2936c8899 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 23 May 2018 02:33:46 -0700 Subject: deal with db failure gracefully --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/text.php b/include/text.php index aafba2168..34063cdd7 100644 --- a/include/text.php +++ b/include/text.php @@ -572,7 +572,7 @@ function item_message_id() { $r = q("SELECT id FROM item WHERE mid = '%s' LIMIT 1", dbesc($mid)); - if(count($r)) + if($r) $dups = true; } while($dups == true); @@ -593,7 +593,7 @@ function photo_new_resource() { $r = q("SELECT id FROM photo WHERE resource_id = '%s' LIMIT 1", dbesc($resource)); - if(count($r)) + if($r) $found = true; } while($found === true); -- cgit v1.2.3