diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/entities.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index c76e8d970..d0c637a3f 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -791,6 +791,8 @@ $subtype_id = (int)$subtype_id; + if (!$subtype_id) return false; + $result = get_data_row("SELECT * from {$CONFIG->dbprefix}entity_subtypes where id=$subtype_id"); if ($result) return $result->subtype; @@ -829,7 +831,9 @@ { global $CONFIG; - $subtype = (int)$subtype_id; + $subtype_id = (int)$subtype_id; + + if (!$subtype_id) return false; $result = get_data_row("SELECT * from {$CONFIG->dbprefix}entity_subtypes where id=$subtype_id"); if ($result) |