aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/database.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-12 12:15:21 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-12 12:15:21 +0000
commitbddeb141b3bca07b25c3d23e207adbaed7e94e4e (patch)
tree11f5668e16f12257c4f858bc7e28b9cac8a89df2 /engine/lib/database.php
parenta8188db366f3920b22e6de58d51e249049ec4113 (diff)
downloadelgg-bddeb141b3bca07b25c3d23e207adbaed7e94e4e.tar.gz
elgg-bddeb141b3bca07b25c3d23e207adbaed7e94e4e.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* BUGFIX: get_data now catches mysql_errors git-svn-id: https://code.elgg.org/elgg/trunk@186 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r--engine/lib/database.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php
index c28673b48..158738185 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -130,12 +130,13 @@
$resultarray[] = $row;
}
}
- if (empty($resultarray)) {
- return false;
- }
if (mysql_errno($dblink))
throw new DatabaseException(mysql_error($dblink));
+
+ if (empty($resultarray)) {
+ return false;
+ }
return $resultarray;
}