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

Base event JSON encoding decoding check will fail with whole float values.

    XMLWordPrintable

    Details

    • Story Points:
      5
    • Sprint:
      BACKEND Sprint 7

      Description

      Checks are done to ensure that the 'other' event field does not contain an object.

      If the 'other' field contains a float which is a whole number (e.g. 90) then the encoding / decoding will result in the number being returned as an integer. When the comparison is done it will fail.

      Solution: The comparison does not have to be so strict to catch if objects are being passed. '!=' will suffice.
      @see lib/classes/event/base.php line 447

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abgreeve Adrian Greeve
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Marina Glancy
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jan/14