diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-04-05 23:14:05 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-04-05 23:14:05 +0200 |
commit | d49f70fbc749c3b09928eda8faefacce9ba5c2bb (patch) | |
tree | 4e812244f15334a28f5c7bc91ea9445e8558201f | |
parent | 558d604d83fd5ded2edc854a9944ad0d1188e2e5 (diff) | |
parent | 3521e74939866e237d69b0251abc1ecd939276dd (diff) | |
download | forums-d49f70fbc749c3b09928eda8faefacce9ba5c2bb.tar forums-d49f70fbc749c3b09928eda8faefacce9ba5c2bb.tar.gz forums-d49f70fbc749c3b09928eda8faefacce9ba5c2bb.tar.bz2 forums-d49f70fbc749c3b09928eda8faefacce9ba5c2bb.tar.xz forums-d49f70fbc749c3b09928eda8faefacce9ba5c2bb.zip |
Merge pull request #3520 from rxu/ticket/13743
[ticket/13743] Add $phpbb_root_path and $phpEx definitions in message_parser.php
-rw-r--r-- | phpBB/includes/message_parser.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 04a2726d22..63e027cd66 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); } |