变更
This commit is contained in:
+1
-1
@@ -541,7 +541,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
||||
}
|
||||
$validate = $this->resolve($rule);
|
||||
if (!$validate->validation()) {
|
||||
return $this->logger->addError($validate->getError(), 'mysql');
|
||||
return \Kiri::getLogger()->addError($validate->getError(), 'mysql');
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ class Command extends Component
|
||||
private function error(\Throwable $throwable): bool
|
||||
{
|
||||
$message = $this->sql . '.' . json_encode($this->params, JSON_UNESCAPED_UNICODE);
|
||||
return $this->logger->addError($message . $throwable->getMessage(), 'mysql');
|
||||
return \Kiri::getLogger()->addError($message . $throwable->getMessage(), 'mysql');
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -149,7 +149,7 @@ class Pagination extends Component
|
||||
try {
|
||||
call_user_func($this->_callback, $data, $param);
|
||||
} catch (\Throwable $exception) {
|
||||
$this->logger->addError($exception, 'throwable');
|
||||
\Kiri::getLogger()->addError($exception, 'throwable');
|
||||
} finally {
|
||||
$data = null;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ class Pagination extends Component
|
||||
try {
|
||||
call_user_func($this->_callback, $data, $param);
|
||||
} catch (\Throwable $exception) {
|
||||
$this->logger->addError($exception, 'throwable');
|
||||
\Kiri::getLogger()->addError($exception, 'throwable');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ class SqlBuilder extends Component
|
||||
private function __updateBuilder(array $string): string|bool
|
||||
{
|
||||
if (empty($string)) {
|
||||
return $this->logger->addError('None data update.');
|
||||
return \Kiri::getLogger()->addError('None data update.');
|
||||
}
|
||||
|
||||
return 'UPDATE ' . $this->query->from . ' SET ' . implode(',', $string) . $this->_prefix();
|
||||
|
||||
Reference in New Issue
Block a user