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

WS validate_parameters() in execution methods, to be or not to be

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.7.5, 2.8.3, 2.9
    • Web Services
    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE

      Till now it always have been required (and it's present as #1 in my WS review cheatsheet) to verify that validate_parameters() is present it the execution of the function and that, only validated params are used along the function body.

      But here, while reviewing a function fix eagle-eye dmonllao realised that webservice_base_server->execute() method always perform a validate_parameters() call before invoking the function.

      So the question is... why have been always requiring the explicit validation since the born of the webservices when it's already performed automagically? Is there any case where that's not happening?

      Welcome, ciao

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.