Skip to content

Commit

Permalink
Merge pull request #65 from dmolineus/hotfix/php-8-support
Browse files Browse the repository at this point in the history
Prevent undefined array index access for PHP 8 compatibility
  • Loading branch information
m-vo authored May 12, 2023
2 parents c17577d + 01df373 commit d611ee6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Resources/contao/dca/tl_survey.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
'delete' => [
'href' => 'act=delete',
'icon' => 'delete.svg',
'attributes' => 'onclick="if(!confirm(\''.$GLOBALS['TL_LANG']['MSC']['deleteConfirm'].'\'))return false;Backend.getScrollOffset()"',
'attributes' => 'onclick="if(!confirm(\''.($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '').'\'))return false;Backend.getScrollOffset()"',
],
],
],
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/dca/tl_survey_question.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'delete' => [
'href' => 'act=delete',
'icon' => 'delete.svg',
'attributes' => 'onclick="if(!confirm(\''.$GLOBALS['TL_LANG']['MSC']['deleteConfirm'].'\'))return false;Backend.getScrollOffset()"',
'attributes' => 'onclick="if(!confirm(\''.($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '').'\'))return false;Backend.getScrollOffset()"',
],
'toggle' => [
'icon' => 'visible.svg',
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/dca/tl_survey_section.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'delete' => [
'href' => 'act=delete',
'icon' => 'delete.svg',
'attributes' => 'onclick="if(!confirm(\''.$GLOBALS['TL_LANG']['MSC']['deleteConfirm'].'\'))return false;Backend.getScrollOffset()"',
'attributes' => 'onclick="if(!confirm(\''.($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '').'\'))return false;Backend.getScrollOffset()"',
],
'show' => [
'href' => 'act=show',
Expand Down

0 comments on commit d611ee6

Please sign in to comment.