summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2020-11-03 15:04:39 +0100
committerDaniel Weipert <code@drogueronin.de>2020-11-03 15:04:39 +0100
commitab485dcf32eeaa23cca3f2bdb7f1187893362032 (patch)
tree018b60288b86d1e0ec33f2a5b768defc030b3a29 /src
parent714aa53d2e37c540907c2f272fa9a8e670c05ff7 (diff)
Checks whether 'file' is set in codeEditorSettings $argsHEADmain
Diffstat (limited to 'src')
-rw-r--r--src/ThemeEditor.php2
1 files changed, 1 insertions, 1 deletions
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'];
}