Skip to content

Commit

Permalink
Trigger a deprecation for unregistered tables
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Jul 21, 2020
1 parent 3cb436f commit c88a355
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core-bundle/src/Resources/contao/library/Contao/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,8 @@ public static function getClassFromTable($strTable)
return static::$arrClassNames[$strTable];
}

trigger_deprecation('contao/core-bundle', '4.10', sprintf('Not registering table "%s" in $GLOBALS[\'TL_MODELS\'] has been deprecated and will no longer work in Contao 5.0.', $strTable));

$arrChunks = explode('_', $strTable);

if ($arrChunks[0] == 'tl')
Expand Down

0 comments on commit c88a355

Please sign in to comment.