Moodle
  1. Moodle
  2. MDL-21553

amf web service : In Flash an array has normally a numerical key

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Web Services
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      26565

      Description

      From amf should be able to return AND accept an object type instead of an array type for arrays with string keys ie. external_single_structures.

      So in the patch attached to MDL-20808 I have modified the validate_parameters so that :

      • it can accept an object instead of an array where a external_single_structure param is expected. An object is automatically cast to an array.
      • also am using validate_parameters static function to cast the return result to the proper types. Have added a parameter that defaults to false that tells the function to return an external_single_structures as an object.

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: