Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9435

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.2.0-RC1
    • 3.0.x, 3.1.0-a3
    • BBCode Engine
    • None

      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.

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

              Created:
              Updated:
              Resolved: