From e9a4ea21ce53fefd56f18d2bb847db87642f4677 Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Mon, 17 Feb 2025 20:51:40 +0100 Subject: [PATCH] Fix example --- docs/en/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/index.rst b/docs/en/index.rst index 58e148b2..dd65787c 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst @@ -165,7 +165,7 @@ like:: { $result = $this->Authentication->getResult(); // If the user is logged in send them away. - if ($result->isValid()) { + if ($result && $result->isValid()) { $target = $this->Authentication->getLoginRedirect() ?? '/home'; return $this->redirect($target); }