Include safe methods and require the correct package.

This commit is contained in:
James Cole
2025-05-11 14:19:07 +02:00
parent 4af2aadc48
commit 9a02739251
61 changed files with 295 additions and 294 deletions

View File

@@ -179,8 +179,8 @@ class General extends AbstractExtension
return new TwigFilter(
'phphost',
static function (string $string): string {
$proto = (string) parse_url($string, PHP_URL_SCHEME);
$host = (string) parse_url($string, PHP_URL_HOST);
$proto = (string) \Safe\parse_url($string, PHP_URL_SCHEME);
$host = (string) \Safe\parse_url($string, PHP_URL_HOST);
return e(sprintf('%s://%s', $proto, $host));
}