From aeac86cb52431f59fe610c380b66738ce47ef514 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Mon, 21 Feb 2022 11:48:41 +0100 Subject: [PATCH] chg: [Component:CRUD] Typo --- src/Controller/Component/CRUDComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/Component/CRUDComponent.php b/src/Controller/Component/CRUDComponent.php index bb31f16..f017d77 100644 --- a/src/Controller/Component/CRUDComponent.php +++ b/src/Controller/Component/CRUDComponent.php @@ -944,7 +944,7 @@ class CRUDComponent extends Component if ($this->Controller->ParamHandler->isRest()) { $this->Controller->restResponsePayload = $this->RestResponse->viewData($data, 'json'); } elseif ($this->Controller->ParamHandler->isAjax()) { - if (!empty($additionalData['redirect'])) { // If a redirection occors, we need to make sure the flash message gets displayed + if (!empty($additionalData['redirect'])) { // If a redirection occurs, we need to make sure the flash message gets displayed $this->Controller->Flash->error($message); } $this->Controller->ajaxResponsePayload = $this->RestResponse->ajaxFailResponse($this->ObjectAlias, $action, $data, $message, !is_null($errors) ? $errors : $data->getErrors());