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

Add debugging message when MoodleQuickForm::createElement is called statically

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      wip-MDL-56110-master

      Description

      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()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marina Marina Glancy
                Reporter:
                marina Marina Glancy
                Peer reviewer:
                Andrew Nicols
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16