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

HTML-Element file throws warning in strict mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Deferred
    • Affects Version/s: 2.7.3, 3.6.1
    • Fix Version/s: None
    • Component/s: Forms Library
    • Labels:

      Description

      When using HTML-Element "file" in a standard moodle form there is a strict standards warning thrown, because the implementation integrated from pear is missing the parameter $values:

      Strict Standards: Declaration of HTML_QuickForm_file::_findValue() should be compatible with HTML_QuickForm_element::_findValue(&$values) in C:\Users\Admin\xampp183\htdocs\ecommunity\lib\pear\HTML\QuickForm\file.php on line 346

      I know, that using the "file" Element is not recommended, but there might be situations (like uploading a file in the filepicker dialogue), where you might not like to use the fliemanager (as for us by developing a new repository plugin).

      I like to suggest to add the parameter of the inherited method _findValue() in /lib/pear/HTML/QuickForm/file.php as follows to match strict standards.

      function _findValue(&$values = array()) {

        Attachments

        1. screenshot-1.png
          screenshot-1.png
          74 kB
        2. upload_form.php
          1 kB
        3. filepicker.php
          1 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: