Skip to content

Commit

Permalink
Merge pull request #18 from aneno-m-e/php-compatibility
Browse files Browse the repository at this point in the history
Resolve php7.4+ error in unit tests
  • Loading branch information
brendanheywood authored Nov 3, 2023
2 parents d870c5a + 0f10c17 commit 6cd74f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/redirect_rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ public function noredirect_param_is_set() {

// This is needed to support vanity urls which don't exist via the error handler.
$url = new \moodle_url($FULLME);
$raw = clean_param($url->param(self::NO_REDIRECT_PARAM), PARAM_BOOL);
$raw = false;

if (!empty($param) && !empty($FULLME)) {
$raw = clean_param($url->param(self::NO_REDIRECT_PARAM), PARAM_BOOL);
}

return $param || $raw;
}
Expand Down

0 comments on commit 6cd74f0

Please sign in to comment.