mirror of
https://github.com/getgrav/grav.git
synced 2026-02-26 16:41:34 +01:00
safety check in Utils::svgImageFunction()
This commit is contained in:
@@ -1426,7 +1426,7 @@ class TwigExtension extends AbstractExtension implements GlobalsInterface
|
||||
|
||||
$classes = $classes ?: '';
|
||||
|
||||
if (file_exists($path)) {
|
||||
if (file_exists($path) && !is_dir($path)) {
|
||||
$svg = file_get_contents($path);
|
||||
$classes = " inline-block $classes";
|
||||
$matched = false;
|
||||
|
||||
Reference in New Issue
Block a user