Bug in Workflow ListView model...
See this section of code:
It's just wrong.
if($sourceModule) {
$listQuery .= " WHERE module_name = '$sourceModule'";
array_push($params, $sourceModule);
}
It is trying to add the encapsulated $sourceModule (but without escaping the "'") name string to the query AND adding it to the params for the pquery call later on.
Either the $listQuery addition should be:
$listQuery .= " WHERE module_name = ?";
Preferred.
Or $sourceModule should NOT be added to the params for the pquery call and it should look like this:
$listQuery .= " WHERE module_name = '".$sourceModule."'";
It can't possibly work when doing both!!!