Issue #2967627 by quietone, yunke: Hook preprocess function always added

merge-requests/2582/head
catch 2022-08-01 14:54:37 +09:00
parent 8eea239a03
commit 511e9fa116
1 changed files with 1 additions and 1 deletions

View File

@ -715,7 +715,7 @@ class Registry implements DestructableInterface {
ksort($suggestion_level);
foreach ($suggestion_level as $level => $item) {
foreach ($item as $preprocessor => $hook) {
if (isset($cache[$hook]['preprocess functions']) && !in_array($hook, $cache[$hook]['preprocess functions'])) {
if (isset($cache[$hook]['preprocess functions']) && !in_array($preprocessor, $cache[$hook]['preprocess functions'])) {
// Add missing preprocessor to existing hook.
$cache[$hook]['preprocess functions'][] = $preprocessor;
}