package and depencies
This commit is contained in:
8
vendor/symfony/http-foundation/UrlHelper.php
vendored
8
vendor/symfony/http-foundation/UrlHelper.php
vendored
@@ -20,8 +20,8 @@ use Symfony\Component\Routing\RequestContext;
|
||||
*/
|
||||
final class UrlHelper
|
||||
{
|
||||
private $requestStack;
|
||||
private $requestContext;
|
||||
private RequestStack $requestStack;
|
||||
private ?RequestContext $requestContext;
|
||||
|
||||
public function __construct(RequestStack $requestStack, RequestContext $requestContext = null)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ final class UrlHelper
|
||||
|
||||
public function getAbsoluteUrl(string $path): string
|
||||
{
|
||||
if (str_contains($path, '://') || '//' === substr($path, 0, 2)) {
|
||||
if (str_contains($path, '://') || str_starts_with($path, '//')) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ final class UrlHelper
|
||||
|
||||
public function getRelativePath(string $path): string
|
||||
{
|
||||
if (str_contains($path, '://') || '//' === substr($path, 0, 2)) {
|
||||
if (str_contains($path, '://') || str_starts_with($path, '//')) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user