diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 07d879029..b0e5bbf2d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -57,6 +57,8 @@ http://www.webgui.org/bugs/tracker/uploaded-file-sizes-wrong#8ao9yNQrxFyJNTUaU7ARPA - fix: Activity Sequence Numbers Incorrect when Editing Workflows (perlDreamer Consulting, LLC) http://www.webgui.org/bugs/tracker/activity-sequence-numbers-incorrect-when-editing-workflows#YRH7TYSWFkEUSPVDNN6zKQ + - fix: Spectre Should Check That It Has a Valid Workflow (perlDreamer Consulting, LLC) + http://www.webgui.org/bugs/tracker/spectre-should-check-that-it-has-a-valid-workflow#lHx4BxEUxcacX7rS5VLxeg 7.3.18 diff --git a/lib/WebGUI/Workflow/Instance.pm b/lib/WebGUI/Workflow/Instance.pm index 18a3b5dfc..d3bb94e5d 100644 --- a/lib/WebGUI/Workflow/Instance.pm +++ b/lib/WebGUI/Workflow/Instance.pm @@ -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; }