mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 05:29:53 +09:00
Update to laravel 7
This commit is contained in:
10
vendor/symfony/http-foundation/UrlHelper.php
vendored
10
vendor/symfony/http-foundation/UrlHelper.php
vendored
@@ -23,7 +23,7 @@ final class UrlHelper
|
||||
private $requestStack;
|
||||
private $requestContext;
|
||||
|
||||
public function __construct(RequestStack $requestStack, ?RequestContext $requestContext = null)
|
||||
public function __construct(RequestStack $requestStack, RequestContext $requestContext = null)
|
||||
{
|
||||
$this->requestStack = $requestStack;
|
||||
$this->requestContext = $requestContext;
|
||||
@@ -31,11 +31,11 @@ final class UrlHelper
|
||||
|
||||
public function getAbsoluteUrl(string $path): string
|
||||
{
|
||||
if (false !== strpos($path, '://') || '//' === substr($path, 0, 2)) {
|
||||
if (str_contains($path, '://') || '//' === substr($path, 0, 2)) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
if (null === $request = $this->requestStack->getMasterRequest()) {
|
||||
if (null === $request = $this->requestStack->getMainRequest()) {
|
||||
return $this->getAbsoluteUrlFromContext($path);
|
||||
}
|
||||
|
||||
@@ -60,11 +60,11 @@ final class UrlHelper
|
||||
|
||||
public function getRelativePath(string $path): string
|
||||
{
|
||||
if (false !== strpos($path, '://') || '//' === substr($path, 0, 2)) {
|
||||
if (str_contains($path, '://') || '//' === substr($path, 0, 2)) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
if (null === $request = $this->requestStack->getMasterRequest()) {
|
||||
if (null === $request = $this->requestStack->getMainRequest()) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user