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

Undefined index when adding logs from extensions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.1.0-RC3
    • 3.1.0-RC2
    • Extensions
    • None

      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.

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

              Created:
              Updated:
              Resolved: