Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443915
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443915
Commits
01ae6f50
Commit
01ae6f50
authored
17 years ago
by
Gábor Hojtsy
Browse files
Options
Downloads
Patches
Plain Diff
#158452
by kenji_kun, patch by myself: GET['q'] might not be defined at the...
#158452
by kenji_kun, patch by myself: GET['q'] might not be defined at the language bootstrap phase
parent
e4c7378e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/language.inc
+4
-1
4 additions, 1 deletion
includes/language.inc
with
4 additions
and
1 deletion
includes/language.inc
+
4
−
1
View file @
01ae6f50
...
...
@@ -30,9 +30,12 @@ function language_initialize() {
case
LANGUAGE_NEGOTIATION_PATH_DEFAULT
:
case
LANGUAGE_NEGOTIATION_PATH
:
$languages
=
language_list
(
'prefix'
);
$args
=
explode
(
'/'
,
$_GET
[
'q'
]);
// $_GET['q'] might not be available at this time, because
// path initialization runs after the language bootstrap phase.
$args
=
isset
(
$_GET
[
'q'
])
?
explode
(
'/'
,
$_GET
[
'q'
])
:
array
();
$language
=
array_shift
(
$args
);
if
(
isset
(
$languages
[
$language
]))
{
// Rebuild $GET['q'] with the language removed.
$_GET
[
'q'
]
=
implode
(
'/'
,
$args
);
return
$languages
[
$language
];
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment