I then get the following
Warning: Invalid argument supplied for foreach() in /homepages/6/d314240079/htdocs/mysite/models/file_set.php on line 98
Warning: Cannot modify header information - headers already sent by (output started at /homepages/6/d314240079/htdocs/mysite/models/file_set.php:99) in /homepages/6/d314240079/htdocs/mysite/concrete/libraries/controller.php on line 357
I was able to get around it by wrapping the foreach in an if_array()
if(is_array($files)){foreach($filesas$fID){$db->Execute('update FileSetFiles set fsDisplayOrder = ? where fsID = ? and fID = ?',array($i,$this->getFileSetID(),$fID));$i++;}}