/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
38
public function getSource()
39
{
40
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() 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.');}
Loading history...
41
42
return $this->getSourceContext()->getCode();
43
}
44
45
public function getSourceContext()
46
{
47
return new Twig_Source("{{ title }}", "errors/404.html.twig", "F:\\OpenServer\\OSPanel\\domains\\github\\Rudra-Framework\\app\\resources\\twig\\view\\errors\\404.html.twig");
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.