mirror of
https://github.com/getgrav/grav.git
synced 2026-02-21 05:58:01 +01:00
check for file existence
This commit is contained in:
@@ -22,7 +22,7 @@ class Security
|
||||
*/
|
||||
public static function sanitizeSVG($file)
|
||||
{
|
||||
if (Grav::instance()['config']->get('security.sanitize_svg')) {
|
||||
if (Grav::instance()['config']->get('security.sanitize_svg') && file_exists($file)) {
|
||||
$sanitizer = new Sanitizer();
|
||||
$original_svg = file_get_contents($file);
|
||||
$clean_svg = $sanitizer->sanitize($original_svg);
|
||||
|
||||
Reference in New Issue
Block a user