aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/pagehandler.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php
index 8d0f9abee..fc11f2d67 100644
--- a/engine/lib/pagehandler.php
+++ b/engine/lib/pagehandler.php
@@ -33,8 +33,11 @@ function page_handler($handler, $page) {
}
}
- // if page url ends in a / then last element of $page is an empty string
- $page = explode('/',$page);
+ $page = explode('/', $page);
+ // remove empty array element when page url ends in a / (see #1480)
+ if ($page[count($page) - 1] === '') {
+ array_pop($page);
+ }
if (!isset($CONFIG->pagehandler) || empty($handler)) {
$result = false;