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

Invalid parameter in core_get_string call

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.6
    • Fix Version/s: None
    • Component/s: Web Services
    • Labels:
      None
    • Affected Branches:
      MOODLE_26_STABLE

      Description

      When calling:

      http://server/moodle/webservice/rest/server.php?wstoken=averylongstringforatoken&wsfunction=core_get_string&stringid=actionchoice

      I get an invalid parameter error. In theory the rest of the possible parameters should use the defaults, the only required parameter according to the API is the stringid. The above value for string id has been taken from the lang/en/moodle.php file, the component defaulting to "moodle" and the lang defaulting to "en".

      Discovered if you comment out line 90 in moodle/lib/external/externallib.php which is:

      'lang' => new external_value(PARAM_LANG, 'lang', VALUE_DEFAULT, null),

      Then this call works.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              baantonia Bill Antonia
              Participants:
              Component watchers:
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: