From ab485dcf32eeaa23cca3f2bdb7f1187893362032 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 3 Nov 2020 15:04:39 +0100 Subject: Checks whether 'file' is set in codeEditorSettings $args --- src/ThemeEditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ThemeEditor.php b/src/ThemeEditor.php index 194b59d..60ae997 100644 --- a/src/ThemeEditor.php +++ b/src/ThemeEditor.php @@ -40,7 +40,7 @@ class ThemeEditor * @return array */ public function codeEditorSettings($settings, $args) { - if (strpos($args['file'], '.twig') !== false) { + if (isset($args['file']) && strpos($args['file'], '.twig') !== false) { $settings['codemirror']['mode'] = ['name' => 'twig', 'base' => 'text/html']; } -- cgit v1.2.3