Skip to content

Commit 88de0e0

Browse files
Merge branch '2.7' into 2.8
* 2.7: [minor] SCA
2 parents f09fd1b + 75225db commit 88de0e0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

CacheWarmer/TemplateFinder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,10 @@ private function findTemplatesInFolder($dir)
9797
private function findTemplatesInBundle(BundleInterface $bundle)
9898
{
9999
$name = $bundle->getName();
100-
$templates = array_merge(
100+
$templates = array_unique(array_merge(
101101
$this->findTemplatesInFolder($bundle->getPath().'/Resources/views'),
102102
$this->findTemplatesInFolder($this->rootDir.'/'.$name.'/views')
103-
);
104-
$templates = array_unique($templates);
103+
));
105104

106105
foreach ($templates as $i => $template) {
107106
$templates[$i] = $template->set('bundle', $name);

Templating/Helper/CodeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function formatFile($file, $line, $text = null)
160160
$file = trim($file);
161161
$fileStr = $file;
162162
if (0 === strpos($fileStr, $this->rootDir)) {
163-
$fileStr = str_replace($this->rootDir, '', str_replace('\\', '/', $fileStr));
163+
$fileStr = str_replace(array('\\', $this->rootDir), array('/', ''), $fileStr);
164164
$fileStr = htmlspecialchars($fileStr, $flags, $this->charset);
165165
$fileStr = sprintf('<abbr title="%s">kernel.root_dir</abbr>/%s', htmlspecialchars($this->rootDir, $flags, $this->charset), $fileStr);
166166
}

0 commit comments

Comments
 (0)