Qualify a chained method call when getting Workflow instances. If the

workflow for an instance is ever deleted, then no existing instances after that
instance will ever be sent to Spectre.
This commit is contained in:
Colin Kuskie 2009-01-21 21:12:26 +00:00
parent af2b83219a
commit 88973add2f

View file

@ -69,7 +69,7 @@ sub www_spectreGetSiteData {
my $cookieName = $session->config->getCookieName;
my @instances = ();
foreach my $instance (@{WebGUI::Workflow::Instance->getAllInstances($session)}) {
next unless $instance->getWorkflow->get("enabled");
next unless $instance->getWorkflow && $instance->getWorkflow->get("enabled");
push(@instances, {
instanceId => $instance->getId,
priority => $instance->get("priority"),