summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/language.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/language.inc b/includes/language.inc
index d31928269..52b5bd6ce 100644
--- a/includes/language.inc
+++ b/includes/language.inc
@@ -342,7 +342,7 @@ function language_from_default() {
* - The path without the prefix on success, the given path otherwise.
*/
function language_url_split_prefix($path, $languages) {
- $args = empty($path) ? array() : explode('/', $path);
+ $args = empty($path) ? array() : explode('/', trim($path, '/'));
$prefix = array_shift($args);
// Search prefix within enabled languages.