There is an issue with the Canvas class method getResponse. It has an underscore "_getResponse" which is causing a php error when trying to use the API. It seems like removing this underscore makes everything all good and run again, so I made a tiny patch for it.
Repeatable: Always
Steps to repeat:
- Install Canvas API 8.x-1.x-dev version
- Enable and configure the module
- Use the GET method in a Canvas API call
Expected Results:
Send a GET request and get a JSON response back from Canvas.
Actual Results:
The page returns a php error related to an undefined method.
The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\canvas_api\CanvasCourses::getResponse() in Drupal\canvas_api\Canvas->get() (line 77 of modules/contrib/canvas_api/src/Canvas.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | canvas-api-3026610-remove-underscore.patch | 357 bytes | brittany.huntzberry |
Comments
Comment #2
brittany.huntzberryComment #3
brittany.huntzberryComment #4
brittany.huntzberryComment #6
zerbash commentedHuh, don't know how that got in there. Thanks for catching that!