Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External function parameters: invalid OPTIONAL value specified. #29

Open
noisyjerm opened this issue Jan 11, 2023 · 0 comments
Open

External function parameters: invalid OPTIONAL value specified. #29

noisyjerm opened this issue Jan 11, 2023 · 0 comments

Comments

@noisyjerm
Copy link

line 729 of /lib/externallib.php: call to debugging()
line 165 of /blocks/exaport/externallib.php: call to external_function_parameters->__construct()
line 122 of /lib/externallib.php: call to block_exaport_external::get_item_parameters()
line 199 of /admin/webservice/forms.php: call to external_api::external_function_info()
line 214 of /lib/formslib.php: call to external_service_functions_form->definition()
line 63 of /admin/webservice/service_functions.php: call to moodleform->__construct()

This error may prevent an admin from configuring a webservice. /admin/webservice/service_functions.php

Replace line 165 of /eternallib.php
'owneruserid' => new external_value(PARAM_INT, 'id of owner of this file (needed for items in shared categories', VALUE_OPTIONAL),
with
'owneruserid' => new external_value(PARAM_INT, 'id of owner of this file (needed for items in shared categories', VALUE_DEFAULT),

See: https://moodledev.io/docs/apis/subsystems/external/writing-a-service#required-optional-or-default-value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant