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

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.x, 3.1.0-a3
    • Fix Version/s: 3.2.0-RC1
    • Component/s: BBCode Engine
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: