diff --git a/src/Form/Control/Multiline.php b/src/Form/Control/Multiline.php index d19659f573..a9000feda0 100644 --- a/src/Form/Control/Multiline.php +++ b/src/Form/Control/Multiline.php @@ -686,8 +686,7 @@ private function outputJson(): void case 'on-change': $rowsRaw = $this->getApp()->decodeJson($this->getApp()->getRequestPostParam('rows')); $response = ($this->onChangeFunction)($this->typeCastLoadValues($rowsRaw), $this->form); - $this->renderCallback->terminateAjax($this->renderCallback->getAjaxec($response)); - // TODO JsCallback::terminateAjax() should return never + $this->renderCallback->terminateAjaxIfCanTerminate($this->renderCallback->getAjaxec($response)); } } diff --git a/src/JsCallback.php b/src/JsCallback.php index 87d207431a..29d7a5d13a 100644 --- a/src/JsCallback.php +++ b/src/JsCallback.php @@ -93,7 +93,7 @@ public function set($fx = null, $args = null) $ajaxec = $this->getAjaxec($response); - $this->terminateAjax($ajaxec); + $this->terminateAjaxIfCanTerminate($ajaxec); }); return $this; @@ -106,7 +106,7 @@ public function set($fx = null, $args = null) * @param ($success is true ? null : string) $msg General message, typically won't be displayed * @param bool $success Was request successful or not */ - public function terminateAjax(JsBlock $ajaxec, $msg = null, bool $success = true): void + public function terminateAjaxIfCanTerminate(JsBlock $ajaxec, $msg = null, bool $success = true): void { $data = ['success' => $success]; if (!$success) { diff --git a/src/JsSse.php b/src/JsSse.php index ca55bf93bd..694972dbd5 100644 --- a/src/JsSse.php +++ b/src/JsSse.php @@ -99,7 +99,6 @@ public function send(JsExpressionable $action, bool $success = true): void /** * @return never */ - #[\Override] public function terminateAjax(JsBlock $ajaxec, $msg = null, bool $success = true): void { $ajaxecStr = $ajaxec->jsRender();