Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"require": {
"packaged/helpers": "^1.0||^2.0",
"packaged/http": "~1.1",
"packaged/http": "~1.1|^2.0.0",
"packaged/config": "~1.4",
"tedivm/jshrink": "~1.3"
},
Expand Down
7 changes: 3 additions & 4 deletions src/Dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
use Packaged\Dispatch\Resources\ResourceFactory;
use Packaged\Helpers\BitWise;
use Packaged\Helpers\Path;
use Packaged\Http\Response;
use RuntimeException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use function array_filter;
use function array_shift;
use function base_convert;
Expand Down Expand Up @@ -47,7 +47,7 @@ class Dispatch
* @var ResourceStore
*/
protected $_resourceStore;
protected $_baseUri;
protected $_baseUri = "";
protected $_requireFileHash = false;
/**
* @var ConfigProvider
Expand Down Expand Up @@ -107,7 +107,6 @@ public static function destroy()
/**
* Add salt to dispatch hashes, for additional resource security
*
*
* @param string $hashSalt
*
* @return $this
Expand Down Expand Up @@ -206,7 +205,7 @@ public function getComponentAliases()
*/
public function handleRequest(Request $request): Response
{
$path = urldecode(substr($request->getPathInfo(), strlen(Request::create($this->_baseUri)->getPathInfo())));
$path = urldecode(substr($request->getPathInfo(), strlen(Request::create($this->_baseUri ?? "")->getPathInfo())));
$pathParts = array_filter(explode('/', $path));
$type = array_shift($pathParts);
switch($type)
Expand Down