Skip to content

Commit

Permalink
pkp#10818 Simplified if clause
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jan 18, 2025
1 parent e598e9f commit 778d1bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/core/PKPPageRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ private function _setLocale(PKPRequest $request, ?string $setLocale): void
$urlLocale = $this->_getRequestedUrlParts(['Core', 'getLocalization'], $request);
$multiLingual = count($this->_getContextAndLocales($request, $contextPath)[1]) > 1;

if (!$multiLingual && !$urlLocale && !$setLocale || $multiLingual && !$setLocale && $urlLocale === Locale::getLocale()) {
if (!$setLocale && ($multiLingual ? $urlLocale === Locale::getLocale() : !$urlLocale)) {
return;
}

Expand Down

0 comments on commit 778d1bc

Please sign in to comment.