mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
Merge pull request #3520 from rxu/ticket/13743
[ticket/13743] Add $phpbb_root_path and $phpEx definitions in message_parser.php
This commit is contained in:
commit
d49f70fbc7
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue