Index: branches/5.2.x/core/kernel/db/db_connection.php =================================================================== diff -u -N -r16662 -r16710 --- branches/5.2.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 16662) +++ branches/5.2.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 16710) @@ -1,6 +1,6 @@ serverIndex = $server_index; if ( !$error_handler ) { - $this->errorHandler = Array(&$this, 'handleError'); + $this->setErrorHandler(array(&$this, 'handleError')); } else { - $this->errorHandler = $error_handler; + $this->setErrorHandler($error_handler); } $this->_captureStatistics = defined('DBG_CAPTURE_STATISTICS') && DBG_CAPTURE_STATISTICS && !(defined('ADMIN') && ADMIN); @@ -932,6 +931,18 @@ return is_numeric($row['Seconds_Behind_Master']) ? $row['Seconds_Behind_Master'] : false; } + /** + * Sets an error handler. + * + * @param callable $error_handler Error handler. + * + * @return void + */ + public function setErrorHandler(callable $error_handler) + { + $this->errorHandler = $error_handler; + } + }