Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
d79b9359
Commit
d79b9359
authored
Apr 13, 2012
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#261148
by mikeytown2, chx, pwolanin: Fixed menu_masks() variable is empty (race condition).
parent
234b0c63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
core/includes/menu.inc
core/includes/menu.inc
+8
-1
No files found.
core/includes/menu.inc
View file @
d79b9359
...
...
@@ -316,7 +316,14 @@ function menu_get_ancestors($parts) {
$ancestors
=
array
();
$length
=
$number_parts
-
1
;
$end
=
(
1
<<
$number_parts
)
-
1
;
$masks
=
variable_get
(
'menu_masks'
,
array
());
$masks
=
variable_get
(
'menu_masks'
);
// If the optimized menu_masks array is not available use brute force to get
// the correct $ancestors and $placeholders returned. Do not use this as the
// default value of the menu_masks variable to avoid building such a big
// array.
if
(
!
$masks
)
{
$masks
=
range
(
511
,
1
);
}
// Only examine patterns that actually exist as router items (the masks).
foreach
(
$masks
as
$i
)
{
if
(
$i
>
$end
)
{
...
...
Write
Preview
Markdown
is supported
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