aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/pageowner.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index 034349d67..f4f96b0e6 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -113,8 +113,17 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params)
}
$uri = $_SERVER['REQUEST_URI'];
- if (strpos($uri, '/pg') === 0) {
- $segments = explode('/', $uri);
+ // ignore the query
+ $parts = parse_url($uri);
+
+ if ($parts && isset($parts['path'])) {
+ $path = $parts['path'];
+ } else {
+ return $returnvalue;
+ }
+
+ if (strpos($path, '/pg') === 0) {
+ $segments = explode('/', $path);
if (isset($segments[3]) && isset($segments[4])) {
switch ($segments[3]) {
case 'owner':