Created
April 4, 2016 13:40
-
-
Save vsguts/18809952121f424392210ef814c67a6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/Tygh/Database/Connection.php b/app/Tygh/Database/Connection.php | |
index f6f75c3..f8eb039 100644 | |
--- a/app/Tygh/Database/Connection.php | |
+++ b/app/Tygh/Database/Connection.php | |
@@ -287,9 +287,10 @@ class Connection | |
$this->db->freeResult($_result); | |
+ return is_array($result) ? $result : array(); | |
} | |
- return is_array($result) ? $result : array(); | |
+ return array(); | |
} | |
/** | |
@@ -849,12 +850,16 @@ class Connection | |
Registry::push('runtime.database.errors', $error); | |
} else { | |
+ Registry::set('runtime.database.skip_errors', true); | |
+ | |
// Log database errors | |
fn_log_event('database', 'error', array( | |
'error' => $error, | |
'backtrace' => debug_backtrace() | |
)); | |
+ Registry::set('runtime.database.skip_errors', false); | |
+ | |
throw new DatabaseException($error['message'] . "<p>{$error['query']}</p>"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment