aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/entities.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 480a08b66..a2d3bf48e 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -826,11 +826,11 @@
{
global $CONFIG;
+ if ($subtype === false || $subtype === null || $subtype === 0)
+ return false;
+
$type = sanitise_string($type);
$subtype = get_subtype_id($type, $subtype);
-
- if ($subtype === false || $subtype === null || $subtype === 0)
- return false;
$order_by = sanitise_string($order_by);
$limit = (int)$limit;