aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/metadata.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index afb480ce5..d509424e2 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -428,10 +428,14 @@
$where[] = "e.type='$entity_type'";
if ($entity_subtype)
$where[] = "e.subtype=$entity_subtype";
- if ($meta_name!="")
+ if ($meta_name!="") {
+ if (!$meta_v) return false; // The value is set, but we didn't get a value... so something went wrong.
$where[] = "m.name_id='$meta_n'";
- if ($meta_value!="")
+ }
+ if ($meta_value!="") {
+ if (!$meta_v) return false; // The value is set, but we didn't get a value... so something went wrong.
$where[] = "m.value_id='$meta_v'";
+ }
if ($site_guid > 0)
$where[] = "m.entity_guid = {$site_guid}";