Skip to content

Commit ba27e63

Browse files
author
Ben Thomson
committed
Explicitly check for 'no redirect' and 'refresh page' values for redirect property.
Credit to @Ladylain for initial idea. Fixes #385. Refs: #387
1 parent c30042c commit ba27e63

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

components/Account.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,16 @@ protected function makeRedirection($intended = false)
486486
{
487487
$method = $intended ? 'intended' : 'to';
488488

489-
$property = $this->property('redirect');
489+
$property = trim((string) $this->property('redirect'));
490490

491-
if (empty($property)) {
491+
// No redirect
492+
if ($property === '0') {
492493
return;
493494
}
495+
// Refresh page
496+
if ($property === '') {
497+
return Redirect::refresh();
498+
}
494499

495500
$redirectUrl = $this->pageUrl($property) ?: $property;
496501

0 commit comments

Comments
 (0)