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

Undefined array key "eol" in version_helper.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None

       

      Description

      An Undefined array key "eol" warning can occur in the Administration Control Panel when phpBB checks for available updates.

      The error occurs in version_helper.php while processing update information:

       

      {{ContextErrorException

      Warning: Undefined array key "eol"

      in version_helper.php line 244
      at version_helper->phpbb

      {closure}

      ()
      at array_reduce()
      in version_helper.php line 241
      at version_helper->get_update_on_branch()
      in acp_main.php line 474
      at acp_main->main()
      in functions_module.php line 684
      at p_master->load_active()
      in index.php line 81}}

      As a consequence, access to the Administration Control Panel can be blocked by the error.

      Observed behaviour

      The error appears when version_helper::get_update_on_branch() processes update information containing an entry where the eol array key is not defined.

      The affected code appears to assume that eol is always present.

      Temporary workaround

      Adding the following line before the affected access restores access to the ACP:

       

      $data['eol'] = isset($data['eol']) ? $data['eol'] : '';

      This prevents the warning when the eol key is missing.

      Expected behaviour

      phpBB should handle update information where the eol key is missing without generating a PHP warning or preventing access to the ACP.

      The code should either:

      • provide a default value when eol is not defined, or
      • verify that the key exists before accessing it.

      For example:

       

      $data['eol'] = isset($data['eol']) ? $data['eol'] : '';

      or an equivalent implementation appropriate for the phpBB coding standards.

      Additional information

      This issue has been encountered on more than one phpBB installation.

      The problem appears to originate from the update/version information processed by the phpBB core rather than from a third-party extension.

      It would be useful to determine why the update data can contain an entry without the eol key and whether the upstream update information format has changed.

      Environment

      • phpBB: [version]
      • PHP: [version]
      • Database: [MySQL/MariaDB/etc.]
      • Server OS: [OS]
      • PHP error reporting/debug mode: [enabled/disabled]

      The exact contents of the update response that trigger the missing eol key can be provided if required.

       

      Source: https://www.phpbb-fr.com/forums/viewtopic.php?p=1695277#p1695277

            Unassigned Unassigned
            ssl Fred Rimbert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: