class HttpMessageMarkupExtension extends AbstractExtension
14
{
15
/**
16
* {@inheritdoc}
17
*
18
* @return array
19
*/
20
1
public function getFilters()
21
{
22
return [
23
1
new TwigFilter('httplug_markup', [$this, 'markup'], ['is_safe' => ['html']]),
24
];
25
}
26
27
/**
28
* @param string $message http message
29
*/
30
public function markup($message)
31
{
32
@trigger_error('"httplug_markup" twig extension is deprecated since version 1.17 and will be removed in 2.0. Use "@Httplug/http_message.html.twig" template instead.', E_USER_DEPRECATED);
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
If you suppress an error, we recommend checking for the error condition explicitly: