aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-20 16:49:59 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-20 16:49:59 +0000
commit1a0fe8c64e9d886bf893a1d0de2df17e6d71eedf (patch)
tree7859e92254c0302280d7de2715380d447c6aa5d2 /engine
parentbe1e1e8d5d726eccd964b404234423bd0119e321 (diff)
downloadelgg-1a0fe8c64e9d886bf893a1d0de2df17e6d71eedf.tar.gz
elgg-1a0fe8c64e9d886bf893a1d0de2df17e6d71eedf.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* 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
Diffstat (limited to 'engine')
-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)) {