Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31167 PHP strict META
  3. MDL-32573

repository uses PHP4 style calling of instance_config_form methods

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: Repositories
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable the equella repository, add an site wide instance and check there are no errors
      2. Edit the equella side wide instance settings, check there are no strict errors # Enable the file system repository, add an site wide instance and check there are no errors
      3. Edit the file ssytem side wide instance settings, check there are no strict errors
      4. Enable the flickr public repository, add an site wide instance and check there are no errors
      5. Edit the flickr side wide instance settings, check there are no strict errors
      6. Enable the webdav repository, add an site wide instance and check there are no errors
      7. Edit the webdav side wide instance settings, check there are no strict errors
      Show
      Enable the equella repository, add an site wide instance and check there are no errors Edit the equella side wide instance settings, check there are no strict errors # Enable the file system repository, add an site wide instance and check there are no errors Edit the file ssytem side wide instance settings, check there are no strict errors Enable the flickr public repository, add an site wide instance and check there are no errors Edit the flickr side wide instance settings, check there are no strict errors Enable the webdav repository, add an site wide instance and check there are no errors Edit the webdav side wide instance settings, check there are no strict errors
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:

      Description

              if (!$this->instance) {
                  $result = repository::static_function($this->plugin, 'instance_config_form', $mform);
                  if ($result === false) {
                      $mform->removeElement('name');
                  }
              } else {
                  $data = array();
                  $data['name'] = $this->instance->name;
                  if (!$this->instance->readonly) {
                      $result = $this->instance->instance_config_form($mform);
      

      is not acceptable in PHP5, please remove the static_function call completely because it can not be E_STRICT compatible:
      Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method repository_filesystem::instance_config_form() should not be called statically in /var/www/repositories/master/moodle/repository/lib.php on line 954

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Jun/12