orca-nrw / crossplatform-moodle-lti-plugin

GNU General Public License v3.0
3 stars 5 forks source link

ORCA-910 Array and Ressource Mixing #4

Closed NinaHerrmann closed 1 year ago

NinaHerrmann commented 1 year ago

When I try to add an activity calling $curl->get( in mod_form.php gives the following error

Fehler: http_build_query(): Argument #1 ($data) must be of type array, resource given

[Weitere Informationen über diesen Fehler](http://docs.moodle.org/400/de/error/moodle/generalexceptionmessage)
Debug-Info: 
Error code: generalexceptionmessage
Stack trace: 

    line 3984 of /lib/filelib.php: TypeError thrown
    line 3984 of /lib/filelib.php: call to http_build_query()
    line 196 of /mod/orcalti/mod_form.php: call to curl->get()
    line 218 of /mod/orcalti/mod_form.php: call to mod_orcalti_mod_form->get_content_by_url()
    line 446 of /mod/orcalti/mod_form.php: call to mod_orcalti_mod_form->get_orcalti_tools()
    line 214 of /lib/formslib.php: call to mod_orcalti_mod_form->definition()
    line 131 of /course/moodleform_mod.php: call to moodleform->__construct()
    line 152 of /course/modedit.php: call to moodleform_mod->__construct()

Actually, $result_json = $curl->get(rtrim(rtrim($request_url, " "), "/") . $subpath, $request_context); passes a context object not an array.

NinaHerrmann commented 1 year ago

Same as beforehand, tell me if you need any more feedback!

NinaHerrmann commented 1 year ago

P.S. might be php8 related as it did not occur with 7.4

KaiOrca commented 1 year ago

Ticket is put on QA stag done. Ticket can be closed