line 332:
throw new \Exception(sprintf(_("Unknown filetype of: %s[%s]"),$filetype,$file));
it seems maybe the function is being called with an empty string which shouldn't happen.
if you want file a bug at http://issues.freepbx.org and I will do some additional validation on the file names