Fix PHP error in UploadController