From ec1fdfb796f5e0442cd5ce11eb8b1cb52c6d8b6d Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 1 Jul 2009 11:48:13 +0000 Subject: Short circuit on delete annotations to avoid error message git-svn-id: https://code.elgg.org/elgg/trunk@3373 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/annotations.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engine/lib/annotations.php') diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 79b2a9168..af28a6aff 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -851,6 +851,9 @@ $annotations = get_data("SELECT id from {$CONFIG->dbprefix}annotations WHERE owner_guid=$owner_guid"); $deleted = 0; + if (!$annotations) + return 0; + foreach ($annotations as $id) { if (delete_annotation($id->id)) // Is this the best way? -- cgit v1.2.3