diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-07-01 11:48:13 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-07-01 11:48:13 +0000 |
commit | ec1fdfb796f5e0442cd5ce11eb8b1cb52c6d8b6d (patch) | |
tree | 8e5a2e49000a9f853fa48925040dcdfccb03b640 /engine/lib/annotations.php | |
parent | e7439554222b46912702ad6041b2767c9411770b (diff) | |
download | elgg-ec1fdfb796f5e0442cd5ce11eb8b1cb52c6d8b6d.tar.gz elgg-ec1fdfb796f5e0442cd5ce11eb8b1cb52c6d8b6d.tar.bz2 |
Short circuit on delete annotations to avoid error message
git-svn-id: https://code.elgg.org/elgg/trunk@3373 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r-- | engine/lib/annotations.php | 3 |
1 files changed, 3 insertions, 0 deletions
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? |