diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-17 17:07:11 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-17 17:07:11 +0000 |
commit | a4a8218cedc9bc776be13cdbb302319b8e82653e (patch) | |
tree | 4db05bdd73d7347acf0116e96838feb246583474 /engine/lib | |
parent | c76e559d489b1bdc733936a39979abdabde8ca8b (diff) | |
download | elgg-a4a8218cedc9bc776be13cdbb302319b8e82653e.tar.gz elgg-a4a8218cedc9bc776be13cdbb302319b8e82653e.tar.bz2 |
Short circuit added for missing values.
git-svn-id: https://code.elgg.org/elgg/trunk@2094 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/metadata.php | 8 |
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}"; |