From 0950110b7313601d443af0c13f0e50c50850b0d6 Mon Sep 17 00:00:00 2001 From: Timon de Groot Date: Mon, 11 Dec 2017 16:19:31 +0100 Subject: [PATCH] Fix unsafe call in Studioforty9_Recaptcha_Helper_Redirect I was testing a custom route for this module using CLI curl and stumbled upon this error: Call to a member function hasLastUrl() on null in app/code/community/Studioforty9/Recaptcha/Helper/Redirect.php on line 67. --- .../community/Studioforty9/Recaptcha/Helper/Redirect.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/community/Studioforty9/Recaptcha/Helper/Redirect.php b/app/code/community/Studioforty9/Recaptcha/Helper/Redirect.php index 6acbc17..008179e 100644 --- a/app/code/community/Studioforty9/Recaptcha/Helper/Redirect.php +++ b/app/code/community/Studioforty9/Recaptcha/Helper/Redirect.php @@ -64,9 +64,9 @@ public function getUrl() return $referer; } - if ($this->_session->hasLastUrl()) { - return $this->_session->getLastUrl(); - } + if ($this->getSession()->hasLastUrl()) { + return $this->getSession()->getLastUrl(); + } return $this->getRequestUri(); }