Browse code

basePath - empty request->path fix

RafaƂ Szklarczyk authored on 22/07/2019 13:02:14
Showing 1 changed files
... ...
@@ -45,7 +45,10 @@ class Application{
45 45
     }
46 46
 
47 47
     public function basePath(){
48
-        return strstr($_SERVER['REQUEST_URI'], $this->request->path, true);
48
+        if(isset($this->request->path))
49
+            return strstr($_SERVER['REQUEST_URI'], $this->request->path, true);
50
+        else
51
+            return $_SERVER['REQUEST_URI'];
49 52
     }
50 53
 
51 54
     public function getServerURL(){