]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Short circuit on delete annotations to avoid error message
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 1 Jul 2009 11:48:13 +0000 (11:48 +0000)
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 1 Jul 2009 11:48:13 +0000 (11:48 +0000)
git-svn-id: https://code.elgg.org/elgg/trunk@3373 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/annotations.php

index 79b2a916824ac1adb8e3ee5b86fbd5408e9e18e3..af28a6affc59902660d1199433762eb58bac1c23 100644 (file)
                $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?