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

Using compare rule results in fatal error in getValidationScript function

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 1.9.2, 2.4
    • Forms Library
    • None
    • MOODLE_19_STABLE, MOODLE_24_STABLE
    • Easy

    Description

      Easiest way to reproduce this bug is adding this code to any moodle form:

      $mform->addElement('text','name1','3',array('size'=>3));
      $mform->addElement('hidden', 'name2', '5');
      $mform->addRule(array('name1', 'name2'),'You can\'t delete blanks','compare','>=','client',true);//uncommenting this line results in error in getValidationScript

      If you uncomment the last line you receive in Moodle 2.4
      "Fatal error: Call to a member function getType() on a non-object in Z:\home\moodle\www\lib\formslib.php on line 1818"

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              oa_sychev Oleg Sychev
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.