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

"magic numbers" in message_parser.php/bbcode.php

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 3.0.x, 3.1.0-a3
    • 3.2.0-RC1
    • BBCode Engine
    • None

    Description

      Looking at includes/message_parser.php & includes/bbcode.php there seem to be "magic numbers" hardcoded for the bbcode_ids. I would suggest these are converted to be constants instead.

      By doing this it would help reduce issues that may be introduced as more bbcode types are added (this would be especially true for mods that add not trivial bbcodes).

      An diff file has been attached with the suggested changes.

      Attachments

        Issue Links

          Activity

            People

              Marc Marc
              krispy krispy
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: