mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
N°8834 - Add compatibility with PHP 8.4 (#819)
* N°8834 - Add compatibility with PHP 8.4 * Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
@@ -32,7 +32,7 @@ class TwigErrorRenderer implements ErrorRendererInterface
|
||||
/**
|
||||
* @param bool|callable $debug The debugging mode as a boolean or a callable that should return it
|
||||
*/
|
||||
public function __construct(Environment $twig, HtmlErrorRenderer $fallbackErrorRenderer = null, bool|callable $debug = false)
|
||||
public function __construct(Environment $twig, ?HtmlErrorRenderer $fallbackErrorRenderer = null, bool|callable $debug = false)
|
||||
{
|
||||
$this->twig = $twig;
|
||||
$this->fallbackErrorRenderer = $fallbackErrorRenderer ?? new HtmlErrorRenderer();
|
||||
@@ -68,7 +68,7 @@ class TwigErrorRenderer implements ErrorRendererInterface
|
||||
|
||||
private function findTemplate(int $statusCode): ?string
|
||||
{
|
||||
$template = sprintf('@Twig/Exception/error%s.html.twig', $statusCode);
|
||||
$template = \sprintf('@Twig/Exception/error%s.html.twig', $statusCode);
|
||||
if ($this->twig->getLoader()->exists($template)) {
|
||||
return $template;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user