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

Removal of functions call_user_method and call_user_method_array in PHP7

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.1
    • 3.0, 3.1
    • Forms Library
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_30_STABLE
    • MDL-52451-master
    • Hide

      Create a custom form and add there:

              $options = array('all' => get_string('any'), 'm' => 'Maths');
              $mform->addElement('select', 'subject', get_string('subject', 'block_community'),
                  $options, array('id' => 'communitysubject'));
              unset($options);
              $mform->addHelpButton('subject', 'subject', 'block_community');
              $this->init_javascript_enhancement('subject', 'smartselect',
                  array('selectablecategories' => true, 'mode' => 'compact'),
                  array('noresults', array('allday', 'calendar')));
      

      Render the form, browse source code and make sure the strings 'noresult','moodle' and 'allday','calendar' are loaded.

      Before this patch this code will show notice on PHP5 and fatal error on PHP7

      Show
      Create a custom form and add there: $options = array('all' => get_string('any'), 'm' => 'Maths'); $mform->addElement('select', 'subject', get_string('subject', 'block_community'), $options, array('id' => 'communitysubject')); unset($options); $mform->addHelpButton('subject', 'subject', 'block_community'); $this->init_javascript_enhancement('subject', 'smartselect', array('selectablecategories' => true, 'mode' => 'compact'), array('noresults', array('allday', 'calendar'))); Render the form, browse source code and make sure the strings 'noresult','moodle' and 'allday','calendar' are loaded. Before this patch this code will show notice on PHP5 and fatal error on PHP7

      looks like we are affected:

      $ git grep call_user_method
      lib/formslib.php:                        call_user_method_array('string_for_js', $PAGE->requires, $string);
      

            marina Marina Glancy
            marina Marina Glancy
            David Monllaó David Monllaó
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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