Skip to content

Commit

Permalink
Fix warning if the global $objPage is not available (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
qzminski authored Aug 22, 2023
1 parent 4f45963 commit caa330d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FrontendHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ protected static function addTemplateURL($data)
$data['templateURL'] = static::getBackendURL('tpl_editor', null, null, null, array(
'key' => 'new_tpl',
'original' => $data['templatePath'],
'target' => $GLOBALS['objPage']->templateGroup ?: 'templates',
'target' => ($GLOBALS['objPage']->templateGroup ?? null) ?: 'templates',
));

System::loadLanguageFile('tl_templates');
Expand Down

0 comments on commit caa330d

Please sign in to comment.