Commit 7294785e authored by alexpott's avatar alexpott

Issue #2821420 by joelpittet, lauriii: drupal_find_theme_templates() searches...

Issue #2821420 by joelpittet, lauriii: drupal_find_theme_templates() searches candidates that are never have templates and are duplicates
parent 4b8275db
......@@ -240,8 +240,7 @@ function drupal_find_theme_templates($cache, $extension, $path) {
// Match templates based on the 'template' filename.
foreach ($cache as $hook => $info) {
if (isset($info['template'])) {
$template_candidates = [$info['template'], str_replace($info['theme path'] . '/templates/', '', $info['template'])];
if (in_array($template, $template_candidates)) {
if ($template === $info['template']) {
$implementations[$hook] = [
'template' => $template,
'path' => dirname($file->uri),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment