Skip to content

Commit

Permalink
Fix PHP 8.0 undefined array key warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Apr 13, 2021
1 parent 62c16ee commit af6f786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function toggleVisibility($intId, $blnVisible)
$this->createInitialVersion('tl_rocksolid_slide', $intId);

// Trigger the save_callback
if (is_array($GLOBALS['TL_DCA']['tl_rocksolid_slide']['fields']['published']['save_callback'])) {
if (is_array($GLOBALS['TL_DCA']['tl_rocksolid_slide']['fields']['published']['save_callback'] ?? null)) {
foreach ($GLOBALS['TL_DCA']['tl_rocksolid_slide']['fields']['published']['save_callback'] as $callback) {
$this->import($callback[0]);
$blnVisible = $this->{$callback[0]}->{$callback[1]}($blnVisible, $this);
Expand Down

0 comments on commit af6f786

Please sign in to comment.