aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/entities.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 8a73b381a..2cadf199c 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -582,6 +582,8 @@
$type = sanitise_string($type);
$subtype = sanitise_string($subtype);
+ if ($subtype=="") return $subtype;
+
$result = get_data_row("SELECT * from {$CONFIG->dbprefix}entity_subtypes where type='$type' and subtype='$subtype'");
if ($result)
@@ -845,7 +847,7 @@
if ($type != "")
$where[] = "type='$type'";
- if ($subtype)
+ if ($subtype!=="")
$where[] = "subtype=$subtype";
if ($owner_guid != "") {
if (!is_array($owner_guid)) {