diff options
author | cash <cash.costello@gmail.com> | 2012-06-19 20:23:49 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2012-06-19 20:23:49 -0400 |
commit | 690f226100a2f690bd77d05a82668c9cfee7b863 (patch) | |
tree | 6150983621f492f304e4cd8dbdc3c1ba5d431aff /engine/lib | |
parent | acb6ceb71afa00a66280f4d33e952df39729eca6 (diff) | |
download | elgg-690f226100a2f690bd77d05a82668c9cfee7b863.tar.gz elgg-690f226100a2f690bd77d05a82668c9cfee7b863.tar.bz2 |
Fixes #4382 catches lost connection to database - from Paweł
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/database.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php index cc2b99f6a..7d90b30b8 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -253,6 +253,10 @@ function execute_query($query, $dblink) { throw new DatabaseException(elgg_echo('DatabaseException:InvalidQuery')); } + if (!is_resource($dblink)) { + throw new DatabaseException(elgg_echo('DatabaseException:InvalidDBLink')); + } + $dbcalls++; $result = mysql_query($query, $dblink); |