aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/annotations.php6
1 files changed, 4 insertions, 2 deletions
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 != "")