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:
@@ -31,7 +31,7 @@ final class BodyRenderer implements BodyRendererInterface
|
||||
private HtmlToTextConverterInterface $converter;
|
||||
private ?LocaleSwitcher $localeSwitcher = null;
|
||||
|
||||
public function __construct(Environment $twig, array $context = [], HtmlToTextConverterInterface $converter = null, LocaleSwitcher $localeSwitcher = null)
|
||||
public function __construct(Environment $twig, array $context = [], ?HtmlToTextConverterInterface $converter = null, ?LocaleSwitcher $localeSwitcher = null)
|
||||
{
|
||||
$this->twig = $twig;
|
||||
$this->context = $context;
|
||||
@@ -45,7 +45,7 @@ final class BodyRenderer implements BodyRendererInterface
|
||||
return;
|
||||
}
|
||||
|
||||
if (null === $message->getTextTemplate() && null === $message->getHtmlTemplate()) {
|
||||
if ($message->isRendered()) {
|
||||
// email has already been rendered
|
||||
return;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ final class BodyRenderer implements BodyRendererInterface
|
||||
$messageContext = $message->getContext();
|
||||
|
||||
if (isset($messageContext['email'])) {
|
||||
throw new InvalidArgumentException(sprintf('A "%s" context cannot have an "email" entry as this is a reserved variable.', get_debug_type($message)));
|
||||
throw new InvalidArgumentException(\sprintf('A "%s" context cannot have an "email" entry as this is a reserved variable.', get_debug_type($message)));
|
||||
}
|
||||
|
||||
$vars = array_merge($this->context, $messageContext, [
|
||||
|
||||
Reference in New Issue
Block a user