The return type could not be reliably inferred; please add a @return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a @return
annotation as described here.
Loading history...
15
{
16
if (!extension_loaded('dom'))
17
{
18
@trigger_error('The DOM Extension is not loaded and is necessary for the "summary" Twig filter.', E_WARNING);
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.');}
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.