aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2018-11-18 01:33:56 +0700
committerrxu <rxu@mail.ru>2018-11-18 01:33:56 +0700
commitda9da88d11f1d62105268def24ae70c0e64bb840 (patch)
tree3e52e5354d93c164ef8b402f1deeec8c3691e715 /phpBB/includes
parent7801bac09ac1fb5a10c0c518e1e7639233855220 (diff)
downloadforums-da9da88d11f1d62105268def24ae70c0e64bb840.tar
forums-da9da88d11f1d62105268def24ae70c0e64bb840.tar.gz
forums-da9da88d11f1d62105268def24ae70c0e64bb840.tar.bz2
forums-da9da88d11f1d62105268def24ae70c0e64bb840.tar.xz
forums-da9da88d11f1d62105268def24ae70c0e64bb840.zip
[ticket/15875] Fix PHP fatal error on BBCode parsing
PHPBB3-15875
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/bbcode.php11
-rw-r--r--phpBB/includes/functions_content.php2
2 files changed, 11 insertions, 2 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index c00f9bd207..c31b63a403 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -35,10 +35,19 @@ class bbcode
/**
* Constructor
- * Init bbcode cache entries if bitfield is specified
*/
function __construct($bitfield = '')
{
+ $this->bbcode_set_bitfield($bitfield);
+ }
+
+ /**
+ * Init bbcode cache entries if bitfield is specified
+ *
+ * @param string $bbcode_bitfield The bbcode bitfield
+ */
+ function bbcode_set_bitfield($bitfield = '')
+ {
if ($bitfield)
{
$this->bbcode_bitfield = $bitfield;
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 43dce036a3..8284aab6a4 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -627,7 +627,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
}
else
{
- $bbcode->bbcode($bitfield);
+ $bbcode->bbcode_set_bitfield($bitfield);
}
$bbcode->bbcode_second_pass($text, $uid);