aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/bbcode.php7
-rw-r--r--phpBB/includes/session.php2
2 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 98bdb3bfcc..9ac850fb6e 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -369,8 +369,13 @@ class bbcode
$matches = preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END (?:.*?) -->#', $tpl, $match);
- for ($i = 0; $i < $matches - 1; $i++)
+ for ($i = 0; $i < $matches; $i++)
{
+ if (empty($match[1][$i]))
+ {
+ continue;
+ }
+
$this->bbcode_template[$match[1][$i]] = $this->bbcode_tpl_replace($match[1][$i], $match[2][$i]);
}
}
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index bf15a0b3ca..39fe8e9f1d 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -76,7 +76,7 @@ class session
// We are on the base level (phpBB root == webroot), lets adjust the variables a bit...
if (!$root_script_path)
{
- $root_script_path = ($page_dir) ? str_replace($page_dir, '', $script_path) : $script_path;;
+ $root_script_path = ($page_dir) ? str_replace($page_dir, '', $script_path) : $script_path;
}
$page_array += array(