Skip to content

Commit 28f404b

Browse files
authored
Merge pull request #72 from UseMuffin/issue-71
Don't throw an exception for missing component for ErrorController.
2 parents e2f5162 + 8efe358 commit 28f404b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Auth/FootprintAwareTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ trait FootprintAwareTrait
2828
/**
2929
* Footprint listener instance.
3030
*
31-
* @var \Cake\Event\EventListenerInterface
31+
* @var \Muffin\Footprint\Event\FootprintListener
3232
*/
3333
protected $_listener;
3434

@@ -107,7 +107,7 @@ protected function _setCurrentUser($user = null): ?EntityInterface
107107
}
108108
} elseif ($this->components()->has('Auth')) {
109109
$user = $this->Auth->user();
110-
} else {
110+
} elseif ($this->name !== 'Error') {
111111
throw new RuntimeException(
112112
'You must have AuthenticationComponent or AuthComponent loaded to use Footprint'
113113
);

0 commit comments

Comments
 (0)