diff options
Diffstat (limited to 'phpBB/includes/template')
-rw-r--r-- | phpBB/includes/template/filter.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php index b6b9a2963e..da2cffe64f 100644 --- a/phpBB/includes/template/filter.php +++ b/phpBB/includes/template/filter.php @@ -871,8 +871,15 @@ class phpbb_template_filter extends php_user_filter { // Strip the trailing period. $namespace = substr($namespace, 0, -1); - $local_namespace = substr(strrchr($namespace, '.'), 1); - $local_namespace = ($local_namespace) ? $local_namespace : $namespace; + + if (($pos = strrpos($namespace, '.')) !== false) + { + $local_namespace = substr($namespace, $pos + 1); + } + else + { + $local_namespace = $namespace; + } $expr = true; |