Skip to content

Commit

Permalink
Merge pull request #79 from jinjie/patch-1
Browse files Browse the repository at this point in the history
getSession() method does not exist in controller
  • Loading branch information
lekoala authored Nov 2, 2021
2 parents 59e38b3 + 18f517e commit ef427b9
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 ef427b9

Please sign in to comment.