Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14603

Outdated call to preg_replace with e modifier breaks custom BBCode creation in HHVM and PHP 7+

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 3.1.8
    • None
    • BBCode Engine
    • HHVM Version 3.12.1 (PHP Version 5.6.99-hhvm)

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Marc Marc
              mewzi mewzi [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: