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

Add debugging message when MoodleQuickForm::createElement is called statically

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2
    • 3.2
    • Forms Library
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • wip-MDL-56110-master
    • Hide
      1. Revert commit https://github.com/moodle/moodle/commit/721e2def56a48fab4f8d3ec7847af5cd03f5ec79 or just restore some of the incorrect calls to @MoodleQuickForm::createElement()
      2. On PHP 5.6 or 7.0 open a form that contains form elements of this type (hint: datetimeselector is present in assignment edit setting form, dateselector is present in course edit form)
      3. Make sure the debugging message is displayed

      P.S. If you do it on PHP 7.1 this will not work at all, this was fixed under MDL-55123

      Show
      Revert commit https://github.com/moodle/moodle/commit/721e2def56a48fab4f8d3ec7847af5cd03f5ec79 or just restore some of the incorrect calls to @MoodleQuickForm::createElement() On PHP 5.6 or 7.0 open a form that contains form elements of this type (hint: datetimeselector is present in assignment edit setting form, dateselector is present in course edit form) Make sure the debugging message is displayed P.S. If you do it on PHP 7.1 this will not work at all, this was fixed under MDL-55123

      In MDL-55123 we have removed static calls to non-static function MoodleQuickForm::createElement in core form elements for php7.1 compatibility.
      However if developers still continue doing it in their plugins they will not give any warning unless they test their plugins on php 7.1 .

      We need to add a debugging message in Moodle so they fix the plugins and make them compatible with 7.1

      Similar debugging message was added under MDL-52081 to prevent plugin developers from calling constructors by class names and only use __construct()

            marina Marina Glancy
            marina Marina Glancy
            Andrew Lyons Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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