summaryrefslogtreecommitdiff
path: root/app/Helper/Url.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Helper/Url.php')
-rw-r--r--app/Helper/Url.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Helper/Url.php b/app/Helper/Url.php
index e133f195..8de63f8d 100644
--- a/app/Helper/Url.php
+++ b/app/Helper/Url.php
@@ -99,6 +99,10 @@ class Url extends \Core\Base
*/
public function server()
{
+ if (empty($_SERVER['SERVER_NAME'])) {
+ return 'http://localhost/';
+ }
+
$self = str_replace('\\', '/', dirname($_SERVER['PHP_SELF']));
$url = Request::isHTTPS() ? 'https://' : 'http://';