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

"Call to a member function xyz() on a non-object" when ommiting ext_name in acp_extensions.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Major Major
    • None
    • 3.1.0-a1
    • None
    • None

      Fatal error: Call to a member function validate_enable() on a non-object in ...\includes\acp\acp_extensions.php on line 86

      One of the translators got this error, I then had a look at the source code and found that the $md_manager is only created, when an ext_name is given. However the object is used later without any previous checking.

      Basically the actions: details, enable and enable_pre should check for existance of the object. So:

      if (!$md_manager->validate_enable())

      should be:

      if (!isset($md_manager) || !$md_manager->validate_enable())

            nicofuma nicofuma
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: