aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-04-05 23:22:41 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-04-05 23:22:41 +0200
commit5ac13c7ddc19a574878959fe6906d5d6cf30da51 (patch)
treeee90056a35dbe1d53537aac68b7da15dbd373bd5 /phpBB/includes/message_parser.php
parent30cf75a0115c11a61d59f811ce9f6b5fece87bbf (diff)
parentd49f70fbc749c3b09928eda8faefacce9ba5c2bb (diff)
downloadforums-5ac13c7ddc19a574878959fe6906d5d6cf30da51.tar
forums-5ac13c7ddc19a574878959fe6906d5d6cf30da51.tar.gz
forums-5ac13c7ddc19a574878959fe6906d5d6cf30da51.tar.bz2
forums-5ac13c7ddc19a574878959fe6906d5d6cf30da51.tar.xz
forums-5ac13c7ddc19a574878959fe6906d5d6cf30da51.zip
Merge branch '3.1.x'
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index ccb953adbe..fe892233ce 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -21,6 +21,19 @@ if (!defined('IN_PHPBB'))
if (!class_exists('bbcode'))
{
+ // The following lines are for extensions which include message_parser.php
+ // while $phpbb_root_path and $phpEx are out of the script scope
+ // which may lead to the 'Undefined variable' and 'failed to open stream' errors
+ if (!isset($phpbb_root_path))
+ {
+ global $phpbb_root_path;
+ }
+
+ if (!isset($phpEx))
+ {
+ global $phpEx;
+ }
+
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
}