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));
}

View File

@@ -255,7 +255,7 @@ class TransactionGroupTwig extends AbstractExtension
return today(config('app.timezone'));
}
return new Carbon(json_decode($entry->data, false));
return new Carbon(\Safe\json_decode($entry->data, false));
}
);
}
@@ -276,7 +276,7 @@ class TransactionGroupTwig extends AbstractExtension
return '';
}
return json_decode($entry->data, true);
return \Safe\json_decode($entry->data, true);
}
);
}