Skip to content

Commit

Permalink
Fix a potential php 8 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Jun 7, 2023
1 parent e3214a8 commit b76f3c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contao/drivers/DC_Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ public function __construct(string $strTable)
}

// Call onload_callback (e.g. to check permissions)
if (\is_array($GLOBALS['TL_DCA'][$this->strTable]['config']['onload_callback'] ?? null))
{
if (
isset($GLOBALS['TL_DCA'][$this->strTable]['config']['onload_callback']) &&
\is_array($GLOBALS['TL_DCA'][$this->strTable]['config']['onload_callback'])
) {
foreach ($GLOBALS['TL_DCA'][$this->strTable]['config']['onload_callback'] as $callback)
{
if (\is_array($callback))
Expand Down

0 comments on commit b76f3c0

Please sign in to comment.