From 64ebd09a4d00e8b425ef762d55b63fa417a8cfff Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 29 Apr 2008 12:05:07 +0000 Subject: Minor fix involving ratings and get annotations git-svn-id: https://code.elgg.org/elgg/trunk@554 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/annotations.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engine/lib/annotations.php') diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 5e59d2e88..7bc1a52ee 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -225,7 +225,9 @@ $entity_guid = (int)$entity_guid; $entity_type = sanitise_string($entity_type); $entity_subtype = get_subtype_id($entity_type, $entity_subtype); - $name = get_metastring_id($name); + $name = get_metastring_id($name); + if ($name === false) + $name = 0; if ($value != "") $value = get_metastring_id($value); $owner_guid = (int)$owner_guid; $limit = (int)$limit; @@ -248,7 +250,7 @@ if ($owner_guid != 0) $where[] = "a.owner_guid=$owner_guid"; - if ($name != "") + if ($name !== "") $where[] = "a.name_id='$name'"; if ($value != "") -- cgit v1.2.3