Skip to content

Commit

Permalink
fixed redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
lhs168 committed Jan 22, 2018
1 parent 462ccee commit d78c34f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fasim/Core/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function display($html) {
*/
public function redirect($nextUrl, $location = true, $data = null) {
if ($nextUrl{0} == '/') $nextUrl = substr($nextUrl, 1);
if (strlen($nextUrl) < 8 || substr($nextUrl, 0, 7) != 'http://' || substr($nextUrl, 0, 8) != 'https://') {
if (strlen($nextUrl) < 8 || (substr($nextUrl, 0, 7) != 'http://' && substr($nextUrl, 0, 8) != 'https://')) {
$nextUrl = $this->config->baseUrl().$nextUrl;
}
if ($location) {
Expand Down

0 comments on commit d78c34f

Please sign in to comment.