-
Task
-
Resolution: Fixed
-
Major
-
3.1.4
-
None
I have found a few instances where the deprecated e modifier of preg_replace is being used in bbcode-related code:
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/bbcode.php#L368
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/bbcode.php#L492
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/message_parser.php#L746
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/message_parser.php#L1552
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/message_parser.php#L1620
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/message_parser.php#L1664
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/acp/acp_bbcodes.php#L491
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/acp/acp_bbcodes.php#L556-L559
These should be converted to preg_replace_callback functions, and the rest of the codebase should be checked to verify that there are no more of these lurking anywhere. This should be done for PHP 7 forward compatibility.
More from elsewhere:
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/includes/ucp/ucp_pm_options.php#L510
- is duplicated by
-
PHPBB-13746 Creating BBCodes in PHP 7 will Fail because of e modifier
- Closed
-
PHPBB-13932 preg_replace(): The /e modifier is no longer supported in php7
- Closed
- is related to
-
PHPBB-13857 Refactor custom bbcodes to not use /e modifier in regex
- Closed