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

Undefined index when adding logs from extensions

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 3.1.0-RC2
    • 3.1.0-RC3
    • Extensions
    • None

    Description

      My extension adds a moderator log entry when a moderator makes a change. Since my extension does not rely on a forum_id or topic_id, an error is thrown for undefined indexes (see screenshot). Here's the relevant section:

      $forum_id = (int) $additional_data['forum_id'];
      unset($additional_data['forum_id']);
      $topic_id = (int) $additional_data['topic_id'];
      unset($additional_data['topic_id']);

      We should probably check if these are set using isset() and then setting them to 0 if not.

      Attachments

        Activity

          People

            nickvergessen Joas Schilling [X] (Inactive)
            tmbackoff Tabitha Backoff [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: