Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/db/db_connection.php
Show First 20 Lines • Show All 384 Lines • ▼ Show 20 Line(s) | |||||
* Sends db error to a predefined error handler | * Sends db error to a predefined error handler | ||||
* | * | ||||
* @param $sql | * @param $sql | ||||
* @return bool | * @return bool | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function callErrorHandler($sql) | protected function callErrorHandler($sql) | ||||
{ | { | ||||
if (is_array($this->errorHandler)) { | return call_user_func($this->errorHandler, $this->errorCode, $this->errorMessage, $sql); | ||||
$func = $this->errorHandler[1]; | |||||
$ret = $this->errorHandler[0]->$func($this->errorCode, $this->errorMessage, $sql); | |||||
} | |||||
else { | |||||
$func = $this->errorHandler; | |||||
$ret = $func($this->errorCode, $this->errorMessage, $sql); | |||||
} | |||||
return $ret; | |||||
} | } | ||||
/** | /** | ||||
* Default error handler for sql errors | * Default error handler for sql errors | ||||
* | * | ||||
* @param int $code | * @param int $code | ||||
* @param string $msg | * @param string $msg | ||||
* @param string $sql | * @param string $sql | ||||
▲ Show 20 Lines • Show All 1002 Lines • Show Last 20 Lines |