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

In generate_text_for_storage the function does not check for errors of parse_message:parse() and act accordingly

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.11, 3.1.0-dev
    • Fix Version/s: 3.1.0-a2
    • Component/s: Other
    • Labels:
      None

      Description

      generate_text_for_storage() uses the parse_message's parse_message::parse() but then it does not do any check for errors.

      I think this is wrong and that it should, actually have a behavior such that it does some check for errors and warn the function that used it about them.

        Issue Links

          Activity

          Hide
          brunoais brunoais added a comment -

          What is the right way of fixing this?
          I'm looking for opinions and suggestions because I don't really know how should I proceed.

          Show
          brunoais brunoais added a comment - What is the right way of fixing this? I'm looking for opinions and suggestions because I don't really know how should I proceed.
          Hide
          brunoais brunoais added a comment -

          Depending on the approach on this, the way of solving the bugs that depend on this may vary.

          Show
          brunoais brunoais added a comment - Depending on the approach on this, the way of solving the bugs that depend on this may vary.
          Hide
          nickvergessen Joas Schilling added a comment -

          I think something like:

          $errors = $message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies);

          is the correct way here.
          Then at the end of the function return $errors instead of nothing.

          However in the 5 use cases were that is used at the moment, there need to be quite some changes so we can catch the errors and do something with it.

          Show
          nickvergessen Joas Schilling added a comment - I think something like: $errors = $message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies); is the correct way here. Then at the end of the function return $errors instead of nothing. However in the 5 use cases were that is used at the moment, there need to be quite some changes so we can catch the errors and do something with it.

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              brunoais brunoais
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development