Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31161

error notice in multiple plugin dependencies

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.3
    • Fix Version/s: 2.2.2
    • Component/s: Installation
    • Labels:

      Description

      Testing plugin->dependencies on moodle 2.2.

      My REGEXP question type version.php has these dependencies:

      $plugin->dependencies = array(
          'qbehaviour_regexpadaptivewithhelp'   => 2012010100,
          'qbehaviour_regexpadaptivewithhelpnopenalty'  => 2012010100,
      );

      My regexpadaptivewithhelpnopenalty behaviour has this dependency:

      $plugin->dependencies = array(
          'qbehaviour_regexpadaptivewithhelp' => 2012010100
      );

      If I install the REGEXP question type without installing any of the 2 required behaviours, on the plugins check page, in the REQUIRED column, I get a "normal" notice for the 2 missing behaviours.

      Then, if I install only the regexpadaptivewithhelpnopenalty behaviour, I get 2 notices of missing regexpadaptivewithhelp behaviour. This is normal.

      However, this scenario throws a PHP notice error:

      Notice: Trying to get property of non-object in moodle\admin\renderer.php on line 601

      Explanation:
      the condition in line 601 should not be tested if $ok is false.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              skodak Petr Skoda added a comment -

              Thanks a lot for the report and proposed patch.

              Show
              skodak Petr Skoda added a comment - Thanks a lot for the report and proposed patch.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated, thanks! (22 and master)

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (22 and master)
              Hide
              salvetore Michael de Raadt added a comment -

              Test result: success

              Tested by introducing multiple dependencies into one of my block plugins.

              Show
              salvetore Michael de Raadt added a comment - Test result: success Tested by introducing multiple dependencies into one of my block plugins.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              This is now available in the git and cvs repositories.

              Consider the responsibility of your fingerprints engraved there for future generations!

              Thanks for the work, closing, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - This is now available in the git and cvs repositories. Consider the responsibility of your fingerprints engraved there for future generations! Thanks for the work, closing, ciao

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Mar/12