Commit 23cbbcb1 authored by Dries's avatar Dries

- Patch #748982 by mikeryan: allow Database logging_callback() to be a class method.

parent 8258959e
......@@ -1017,7 +1017,7 @@ public function popTransaction() {
else {
if (isset($logging_callback)) {
// Log the failed rollback.
$logging_callback('database', 'Explicit rollback failed: not supported on active connection.', array(), $logging['error_severity']);
call_user_func($logging_callback, 'database', 'Explicit rollback failed: not supported on active connection.', array(), $logging['error_severity']);
}
// It would be nice to throw an exception here if logging failed,
......@@ -1028,7 +1028,7 @@ public function popTransaction() {
// Play back the logged errors to the specified logging callback post-
// rollback.
foreach ($rollback_logs as $log_item) {
$logging_callback($log_item['type'], $log_item['message'], $log_item['variables'], $log_item['severity'], $log_item['link']);
call_user_func($logging_callback, $log_item['type'], $log_item['message'], $log_item['variables'], $log_item['severity'], $log_item['link']);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment