diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2012-09-20 11:20:08 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2012-09-20 11:22:48 -0400 |
commit | bd7bf80aae0e8613da2fd60812167e06dd5ce9d5 (patch) | |
tree | 6ee25d938c43eb358c410649dba9923ed90d8fd0 /lib/class/song.class.php | |
parent | afd69ce3340864075982d0d9b8acb442b0f6ffe1 (diff) | |
download | ampache-bd7bf80aae0e8613da2fd60812167e06dd5ce9d5.tar.gz ampache-bd7bf80aae0e8613da2fd60812167e06dd5ce9d5.tar.bz2 ampache-bd7bf80aae0e8613da2fd60812167e06dd5ce9d5.zip |
FS#249 - SQL error for iAmpache client
Add a sanity check before we attempt to execute the SQL statement
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r-- | lib/class/song.class.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php index 0b726aec..3d80e7c7 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -106,6 +106,9 @@ class Song extends database_object implements media { $idlist = '(' . implode(',', $song_ids) . ')'; + // Callers might have passed array(false) because they are dumb + if ($idlist == '()') { return false; } + // Song data cache $sql = 'SELECT `song`.`id`, `file`, `catalog`, `album`, ' . '`year`, `artist`, `title`, `bitrate`, `rate`, ' . |