|
10 | 10 | use Packaged\Dispatch\Resources\ResourceFactory; |
11 | 11 | use Packaged\Helpers\BitWise; |
12 | 12 | use Packaged\Helpers\Path; |
| 13 | +use Packaged\Http\Response; |
13 | 14 | use RuntimeException; |
14 | 15 | use Symfony\Component\HttpFoundation\Request; |
15 | | -use Symfony\Component\HttpFoundation\Response; |
16 | 16 | use function array_filter; |
17 | 17 | use function array_shift; |
18 | 18 | use function base_convert; |
@@ -47,7 +47,7 @@ class Dispatch |
47 | 47 | * @var ResourceStore |
48 | 48 | */ |
49 | 49 | protected $_resourceStore; |
50 | | - protected $_baseUri; |
| 50 | + protected $_baseUri = ""; |
51 | 51 | protected $_requireFileHash = false; |
52 | 52 | /** |
53 | 53 | * @var ConfigProvider |
@@ -107,7 +107,6 @@ public static function destroy() |
107 | 107 | /** |
108 | 108 | * Add salt to dispatch hashes, for additional resource security |
109 | 109 | * |
110 | | - * |
111 | 110 | * @param string $hashSalt |
112 | 111 | * |
113 | 112 | * @return $this |
@@ -206,7 +205,7 @@ public function getComponentAliases() |
206 | 205 | */ |
207 | 206 | public function handleRequest(Request $request): Response |
208 | 207 | { |
209 | | - $path = urldecode(substr($request->getPathInfo(), strlen(Request::create($this->_baseUri)->getPathInfo()))); |
| 208 | + $path = urldecode(substr($request->getPathInfo(), strlen(Request::create($this->_baseUri ?? "")->getPathInfo()))); |
210 | 209 | $pathParts = array_filter(explode('/', $path)); |
211 | 210 | $type = array_shift($pathParts); |
212 | 211 | switch($type) |
|
0 commit comments