Skip to content

Commit

Permalink
Fix bug with undefined method System::log()
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Jul 11, 2023
1 parent 693f65b commit cdb559d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CustomElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Contao\BackendUser;
use Contao\Config;
use Contao\Controller;
use Contao\CoreBundle\Monolog\ContaoContext;
use Contao\Database;
use Contao\DataContainer;
use Contao\FilesModel;
Expand All @@ -21,6 +22,7 @@
use Contao\System;
use Doctrine\DBAL\DBALException;
use MadeYourDay\RockSolidCustomElements\Template\CustomTemplate;
use Psr\Log\LogLevel;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\Request;

Expand Down Expand Up @@ -1403,7 +1405,7 @@ function ($count) {
}
);
if (count($duplicateConfigs)) {
System::log('Duplicate Custom Elements found: ' . implode(', ', array_keys($duplicateConfigs)), __METHOD__, TL_ERROR);
System::getContainer()->get('monolog.logger.contao')->log(LogLevel::ERROR, 'Duplicate Custom Elements found: ' . implode(', ', array_keys($duplicateConfigs)), array('contao' => new ContaoContext(__METHOD__, 'ERROR')));
}

foreach ($allConfigs as $configPath) {
Expand Down

0 comments on commit cdb559d

Please sign in to comment.