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.
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.
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.