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

Distinguish latlong value being zero from having no value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.9.2
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Currently, it is not distinguished if a lat or long field has not set a value or has the value zero (0.0000°). This is of course wrong. If one of the two values has in fact the value zero (which can be real), the latlong field does not get displayed with any value at all. If one of the two values will be deleted, next time the edit page presents its value prefilled by the number zero. Also wrong - the field should be kept empty and not filled by anything.

      This bad behaviour is caused by the use of the empty() function, which does not distinguish between null (empty) and the number zero.

        Attachments

          Activity

            People

            • Assignee:
              roal Robert Allerstorfer
              Reporter:
              roal Robert Allerstorfer
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jul/08