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