From 1a0fe8c64e9d886bf893a1d0de2df17e6d71eedf Mon Sep 17 00:00:00 2001 From: icewing Date: Tue, 20 May 2008 16:49:59 +0000 Subject: Marcus Povey * BUGFIX: get_subtype_id now shortcircuits returning unmodified $subtype if $subtype is "" git-svn-id: https://code.elgg.org/elgg/trunk@663 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engine/lib/entities.php') 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)) { -- cgit v1.2.3