From a1e1d91a640995f40181f0b720f48d971b735b76 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Fri, 29 Nov 2019 16:07:51 +0100 Subject: [PATCH] PHP 7.4: Fixed xdebug code coverage --- src/Config/ConfigServiceProvider.php | 5 +++-- src/Middleware/ErrorHandler.php | 10 ++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Config/ConfigServiceProvider.php b/src/Config/ConfigServiceProvider.php index 2c320fdd..aff7918d 100644 --- a/src/Config/ConfigServiceProvider.php +++ b/src/Config/ConfigServiceProvider.php @@ -40,10 +40,11 @@ class ConfigServiceProvider extends ServiceProvider continue; } - $config->set(array_replace_recursive( + $configuration = array_replace_recursive( $config->get(null), require $file - )); + ); + $config->set($configuration); } if (empty($config->get(null))) { diff --git a/src/Middleware/ErrorHandler.php b/src/Middleware/ErrorHandler.php index 65e2e609..b8f8b166 100644 --- a/src/Middleware/ErrorHandler.php +++ b/src/Middleware/ErrorHandler.php @@ -67,13 +67,11 @@ class ErrorHandler implements MiddlewareInterface if ($request instanceof Request) { $session = $request->getSession(); - $session->set( - 'errors', - array_merge_recursive( - $session->get('errors', []), - ['validation' => $e->getValidator()->getErrors()] - ) + $errors = array_merge_recursive( + $session->get('errors', []), + ['validation' => $e->getValidator()->getErrors()] ); + $session->set('errors', $errors); $session->set('form-data', Arr::except($request->request->all(), $this->formIgnore)); }