This commit is contained in:
2021-04-23 10:20:10 +08:00
parent 10361e6f54
commit 8904df7dff
+3 -4
View File
@@ -151,7 +151,7 @@ class Pagination extends Component
} }
[$length, $data] = $this->get(); [$length, $data] = $this->get();
$this->executed($this->_callback, $data, $param); $this->executed($data, $param);
unset($data); unset($data);
if ($length < $this->_limit) { if ($length < $this->_limit) {
@@ -171,15 +171,14 @@ class Pagination extends Component
/** /**
* @param $callback
* @param $data * @param $data
* @param $param * @param $param
* @throws Exception * @throws Exception
*/ */
private function executed($callback, $data, $param): void private function executed($data, $param): void
{ {
try { try {
call_user_func($callback, $data, $param); call_user_func($this->_callback, $data, $param);
} catch (\Throwable $exception) { } catch (\Throwable $exception) {
$this->addError($exception, 'throwable'); $this->addError($exception, 'throwable');
} finally { } finally {