deal with db failure gracefully
This commit is contained in:
parent
76d8e59e9b
commit
afb29176a4
@ -572,7 +572,7 @@ function item_message_id() {
|
|||||||
|
|
||||||
$r = q("SELECT id FROM item WHERE mid = '%s' LIMIT 1",
|
$r = q("SELECT id FROM item WHERE mid = '%s' LIMIT 1",
|
||||||
dbesc($mid));
|
dbesc($mid));
|
||||||
if(count($r))
|
if($r)
|
||||||
$dups = true;
|
$dups = true;
|
||||||
} while($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",
|
$r = q("SELECT id FROM photo WHERE resource_id = '%s' LIMIT 1",
|
||||||
dbesc($resource));
|
dbesc($resource));
|
||||||
if(count($r))
|
if($r)
|
||||||
$found = true;
|
$found = true;
|
||||||
} while($found === true);
|
} while($found === true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user