-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.1.8
-
HHVM Version 3.12.1 (PHP Version 5.6.99-hhvm)
In acp_bbcodes.php, there is a call to preg_replace using the e modifier that breaks the token- incrementing loop, naturally resulting in all tokens beyond the first being left at $1 and replaced with original first token's value during use.
Because of the type of issue, please note this only happens on codes that use 2+ tokens. Built in and single tokens continue to work as intended.
I have offered a fix for this issue in this thread which works flawlessly on my test box.
Note also I have listed my HHVM in the environment section, but as of vanilla PHP version 5.5, the e modifier was depreciated, and as of PHP 7 it is completely removed.
Also I marked priority as minor as it doesn't happen with the most used versions of PHP, but I would consider custom bbcodes not working to be a major issue given their level of use.
- duplicates
-
PHPBB-9667 Replace preg_replace with /e modifier with preg_replace_callback in includes/bbcode.php
- Closed