forward port of getAllInstances fixes, so that it never returns undef but logs warnings instead
This commit is contained in:
parent
a640222a29
commit
4de39b7fe5
2 changed files with 9 additions and 1 deletions
|
|
@ -166,7 +166,13 @@ sub getAllInstances {
|
|||
my @instances = ();
|
||||
my $rs = $session->db->read("SELECT instanceId FROM WorkflowInstance");
|
||||
while (my ($instanceId) = $rs->array) {
|
||||
push(@instances, WebGUI::Workflow::Instance->new($session, $instanceId));
|
||||
my $instance = WebGUI::Workflow::Instance->new($session, $instanceId);
|
||||
if (defined $instance) {
|
||||
push(@instances, $instance);
|
||||
}
|
||||
else {
|
||||
$session->errorHandler->warn('Tried to instance instanceId '.$instanceId.' but it returned undef');
|
||||
}
|
||||
}
|
||||
return \@instances;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue