diff --git a/src/Controller/Component/ContactUsComponent.php b/src/Controller/Component/ContactUsComponent.php index 7a0e36f..0470a53 100644 --- a/src/Controller/Component/ContactUsComponent.php +++ b/src/Controller/Component/ContactUsComponent.php @@ -92,8 +92,7 @@ class ContactUsComponent extends Component { 'contactUsFormSubmission' => $contactUsFormSubmission, ], $this->getController()); $result = $event->getResult(); - Log::debug(print_r('$result', true)); - Log::debug(print_r($result, true)); + if ($result instanceof EntityInterface) { $postData = $result->toArray(); $contactUsFormSubmission = $this->ContactUsFormSubmissions->patchEntity($contactUsFormSubmission, $postData); @@ -152,8 +151,6 @@ class ContactUsComponent extends Component { $this->Flash->success($message); $redirectUrl = $this->getConfig('redirectUrl'); - Log::debug(print_r('$contactUsFormSubmissionSaved after save', true)); - Log::debug(print_r($contactUsFormSubmissionSaved, true)); if ($this->getConfig('addIdToRedirect')) { $redirectUrl[] = $contactUsFormSubmissionSaved->get($this->ContactUsFormSubmissions->getPrimaryKey()); }