Skip to content

Commit

Permalink
getSession() method does not exist in controller
Browse files Browse the repository at this point in the history
Should call `getSession()` from `HTTPRequest` instead of `Controller`
  • Loading branch information
jinjie authored Nov 2, 2021
1 parent 59e38b3 commit 18f517e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/ZenValidatorConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ public function validate($value)
if (Director::is_relative_url($url)) {
$url = Director::makeRelative($url);
$postVars = $this->method == 'POST' ? $this->params : null;
$response = Director::test($url, $postVars, Controller::curr()->getSession(), $this->method);
$response = Director::test($url, $postVars, Controller::curr()->getRequest()->getSession(), $this->method);
$result = ($response->getStatusCode() == 200) ? true : false;

// Otherwise CURL to remote url
Expand Down

0 comments on commit 18f517e

Please sign in to comment.