Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
53a64bc4
Commit
53a64bc4
authored
Aug 01, 2022
by
catch
Browse files
Issue
#2967627
by quietone, yunke: Hook preprocess function always added
(cherry picked from commit
511e9fa1
)
parent
92af65f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Theme/Registry.php
View file @
53a64bc4
...
...
@@ -754,7 +754,7 @@ protected function postProcessExtension(array &$cache, ActiveTheme $theme) {
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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment