We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 3253de51 authored by Jonas Haraldsson's avatar Jonas Haraldsson

Check if array is empty to prevent adodb exception

parent 5aa85b37
......@@ -271,6 +271,11 @@ function get_artist_selection($artists, $artist = false) {
*/
function get_loved_tracks($users) {
global $adodb;
if (!count($users)) {
return array();
}
$userclause = '( ';
for ($i = 0; $i < count($users); $i++) {
$userclause .= 'Loved_Tracks.userid = ' . $users[$i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment