Skip to content

Commit 206e4ae

Browse files
committed
Remove deprecation usage
1 parent 975b050 commit 206e4ae

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Controller/Component/LegacyAuthComponent.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,13 @@ public function initialize(array $config): void {
239239
* Callback for Controller.startup event.
240240
*
241241
* @param \Cake\Event\EventInterface $event Event instance.
242-
* @return \Cake\Http\Response|null
242+
* @return void
243243
*/
244-
public function startup(EventInterface $event): ?Response {
245-
return $this->authCheck($event);
244+
public function startup(EventInterface $event): void {
245+
$check = $this->authCheck($event);
246+
if ($check !== null) {
247+
$event->setResult($check);
248+
}
246249
}
247250

248251
/**

0 commit comments

Comments
 (0)