Moodle
  1. Moodle
  2. MDL-27148

do not use $string++ in get_in_or_equal

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      17215

      Description

      The problem is that 'a_9'++ overflows and returns 'a_0', please note it works fine in case of 'a9' because it returns 'b0'.

      Solution is to use just parameter name prefix and append a static counter value.

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        This has been integrated and will be available next weekly (git/cvs and downloads).

        Thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - This has been integrated and will be available next weekly (git/cvs and downloads). Thanks!

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: