|
|
@ -67,13 +67,11 @@ class ErrorHandler implements MiddlewareInterface
|
|
|
|
|
|
|
|
|
|
|
|
if ($request instanceof Request) {
|
|
|
|
if ($request instanceof Request) {
|
|
|
|
$session = $request->getSession();
|
|
|
|
$session = $request->getSession();
|
|
|
|
$session->set(
|
|
|
|
$errors = array_merge_recursive(
|
|
|
|
'errors',
|
|
|
|
$session->get('errors', []),
|
|
|
|
array_merge_recursive(
|
|
|
|
['validation' => $e->getValidator()->getErrors()]
|
|
|
|
$session->get('errors', []),
|
|
|
|
|
|
|
|
['validation' => $e->getValidator()->getErrors()]
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
$session->set('errors', $errors);
|
|
|
|
|
|
|
|
|
|
|
|
$session->set('form-data', Arr::except($request->request->all(), $this->formIgnore));
|
|
|
|
$session->set('form-data', Arr::except($request->request->all(), $this->formIgnore));
|
|
|
|
}
|
|
|
|
}
|
|
|
|