diff --git a/src/AuraInputInterceptor.php b/src/AuraInputInterceptor.php index 88592d5..5885271 100644 --- a/src/AuraInputInterceptor.php +++ b/src/AuraInputInterceptor.php @@ -47,7 +47,7 @@ public function invoke(MethodInvocation $invocation) /* @var $formValidation FormValidation */ $formValidation = $this->reader->getMethodAnnotation($invocation->getMethod(), AbstractValidation::class); $form = $this->getFormProperty($formValidation, $object); - $data = $form instanceof SubmitInterface ? $object->submit() : $this->getNamedArguments($invocation); + $data = $form instanceof SubmitInterface ? $form->submit() : $this->getNamedArguments($invocation); $isValid = $this->isValid($data, $form); if ($isValid === true) { // validation success @@ -75,7 +75,7 @@ private function getNamedArguments(MethodInvocation $invocation) } // has token ? if (isset($_POST[AntiCsrf::TOKEN_KEY])) { - $submit += $_POST[AntiCsrf::TOKEN_KEY]; + $submit[AntiCsrf::TOKEN_KEY] = $_POST[AntiCsrf::TOKEN_KEY]; } return $submit;