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

Moodle form validation caches results for all objects.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.4, 3.1, 3.2
    • 3.0.7, 3.1.3
    • Forms Library

    Description

      In validate_defined_fields() it uses

      static $validated = null; // one validation is enough

      However, we can have more than one form being validated, I believe this $validated should me an instance variable, not static.

      Please see my solution for a phpunit test showing the problem.

      Attachments

        Activity

          People

            roperto Daniel Thee Roperto
            roperto Daniel Thee Roperto
            Adrian Greeve Adrian Greeve
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Nov/16