]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Closes #337: Added checking for metastrings in __get_annotations_calculate_x()
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 29 Jun 2009 20:02:45 +0000 (20:02 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 29 Jun 2009 20:02:45 +0000 (20:02 +0000)
git-svn-id: https://code.elgg.org/elgg/trunk@3361 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/annotations.php

index 309d475d7d55abb28c5c49958049209e699fecbd..79b2a916824ac1adb8e3ee5b86fbd5408e9e18e3 100644 (file)
                $entity_guid = (int)$entity_guid;\r
                $entity_type = sanitise_string($entity_type);\r
                $entity_subtype = get_subtype_id($entity_type, $entity_subtype);\r
-               if ($name != '') $name = get_metastring_id($name);
-               if ($value != '') $value = get_metastring_id($value);
+               if ($name != '' AND !$name = get_metastring_id($name))\r
+                       return 0;
+               if ($value != '' AND !$value = get_metastring_id($value))\r
+                       return 0;
                $value_type = sanitise_string($value_type);
                $owner_guid = (int)$owner_guid;\r
                \r