summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-11-24 13:41:11 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2011-11-24 13:41:11 -0800
commitc1b5616cc236c7a65569e1fad039e62e64bfab6a (patch)
treeb4591465d71b5c160d189bc2fb3df29d6667593d /includes
parente1616f4d135f1bccc0de98bcb11bbb88a6e6932d (diff)
downloadbrdo-c1b5616cc236c7a65569e1fad039e62e64bfab6a.tar.gz
brdo-c1b5616cc236c7a65569e1fad039e62e64bfab6a.tar.bz2
Issue #1329914 by xjm, msonnabaum: Fixed Ensure ['q'] is set before calling drupal_normal_path().
Diffstat (limited to 'includes')
-rw-r--r--includes/path.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/path.inc b/includes/path.inc
index db605370c..ed5b639fb 100644
--- a/includes/path.inc
+++ b/includes/path.inc
@@ -13,12 +13,12 @@
* Initialize the $_GET['q'] variable to the proper normal path.
*/
function drupal_path_initialize() {
- if (!empty($_GET['q'])) {
- $_GET['q'] = drupal_get_normal_path($_GET['q']);
- }
- else {
- $_GET['q'] = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
+ // Ensure $_GET['q'] is set before calling drupal_normal_path(), to support
+ // path caching with hook_url_inbound_alter().
+ if (empty($_GET['q'])) {
+ $_GET['q'] = variable_get('site_frontpage', 'node');
}
+ $_GET['q'] = drupal_get_normal_path($_GET['q']);
}
/**