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

Accessing non-static methods in repository class as static (PHP meta STRICT)

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.2
    • 2.3
    • Repositories
    • MOODLE_22_STABLE
    • MOODLE_23_STABLE
    • wip-MDL-32381-master
    • Hide

      1. enable strict mode in php.ini
      2. force strict mode in main config.php

      3. Using FilePicker try to add the file with the same name as already existing. The popup dialog should appear with choice s: Rename, Overwrite, Cancel.
      Make sure all buttons work as expected.

      Show
      1. enable strict mode in php.ini 2. force strict mode in main config.php 3. Using FilePicker try to add the file with the same name as already existing. The popup dialog should appear with choice s: Rename, Overwrite, Cancel. Make sure all buttons work as expected.

    Description

      I found number of PHP notices when using STRICT:

      Strict Standards: Non-static method repository::overwrite_existing_draftfile() should not be called statically in /var/www/repositories/master/moodle/repository/repository_ajax.php on line 278
      true

      the same for function append_suffix($filename) and delete_tempfile_from_draft($draftitemid, $filepath, $filename)

      Attachments

        Issue Links

          Activity

            People

              marina Marina Glancy
              marina Marina Glancy
              Dan Poltawski Dan Poltawski
              Andrew Davis Andrew Davis
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                25/Jun/12