vt720: Bug in ExportReport View class prevents exporting report with no secondary module
This line is not correct. If you have a report with no secondary module the call to split (which is also deprecated and should be replaced with explode) it adds an empty value to the $modulesList array. Then in the foreach loop further down, this line fails:
$permission = userPrivilegesModel->hasModulePermission(moduleInstance->getId());
because $moduleInstance is actually just a false boolean: