yedidiaklein / moodle-repository_pixabay

Moodle Repository for Pixabay images.
GNU General Public License v3.0
1 stars 5 forks source link

bug: endless spinner when api request fails #8

Closed tomdickman closed 4 years ago

tomdickman commented 4 years ago

Fixed an issue where, if the API search request to Pixabay failed, file_get_contents would return an empty value, and a null list value would be passed back to repository API, resulting in an endless spinner animation making it look like results were loading, when the query has actually failed.

Replaced endless spinner with error message and additional debugging message for admins.

chore: removed unused $start variable as well.

tomdickman commented 4 years ago

Added an extra fix for zero results being returned by API, this was also displaying an endless spinner, fixed by initialising the $list variable to an empty array.

yedidiaklein commented 4 years ago

Tnx for that! It was an annoying bug..