Skip to content

Commit

Permalink
Remove usage of deprecated \Config::get('debugMode')
Browse files Browse the repository at this point in the history
  • Loading branch information
discordier committed Oct 30, 2024
1 parent 53fc72e commit e13e472
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Render/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,9 @@ public function parse($strOutputFormat, $blnFailIfNotFound = false)
$this->arrBlocks = [];

// Add start and end markers in debug mode.
if (Config::get('debugMode') && ('html5' === $this->strFormat)) {
$rootDir = System::getContainer()->getParameter('kernel.project_dir');
$container = System::getContainer();
if ($container && $container->getParameter('kernel.debug') && ('html5' === $this->strFormat)) {
$rootDir = $container->getParameter('kernel.project_dir');
assert(\is_string($rootDir));
$strRelPath =
\str_replace($rootDir . '/', '', (string) $this->getTemplate($this->strTemplate, $this->strFormat));
Expand Down

0 comments on commit e13e472

Please sign in to comment.