From 3a4a30e879e9ff74b4eee7fbf622a5ddb6579d0b Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 21 Aug 2013 07:48:54 -0700 Subject: [PATCH] Updated check for base_url. --- flight/Engine.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/flight/Engine.php b/flight/Engine.php index 7cac51a..03e495b 100644 --- a/flight/Engine.php +++ b/flight/Engine.php @@ -101,10 +101,10 @@ class Engine { } // Default configuration settings - $this->set('flight.views.path', './views'); - $this->set('flight.log_errors', false); - $this->set('flight.handle_errors', true); $this->set('flight.base_url', null); + $this->set('flight.handle_errors', true); + $this->set('flight.log_errors', false); + $this->set('flight.views.path', './views'); $initialized = true; } @@ -386,10 +386,9 @@ class Engine { * @param int $code HTTP status code */ public function _redirect($url, $code = 303) { - if ($this->get('flight.base_url') !== null) { - $base = $this->get('flight.base_url'); - } - else { + $base = $this->get('flight.base_url'); + + if ($base === null) { $base = $this->request()->base; }