From 8304bbb111b8795eda88d43e2df2d2c6f89a5099 Mon Sep 17 00:00:00 2001 From: Brad Shuttleworth Date: Mon, 19 Jun 2006 15:07:32 +0000 Subject: [PATCH] fix for BBS-354: if removing all transitions, don't throw an error. --- lib/workflow/workflowutil.inc.php | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/workflow/workflowutil.inc.php b/lib/workflow/workflowutil.inc.php index 29bbbd2..8e88291 100644 --- a/lib/workflow/workflowutil.inc.php +++ b/lib/workflow/workflowutil.inc.php @@ -66,6 +66,9 @@ class KTWorkflowUtil { return $res; } $aOptions = array('noid' => true); + if (empty($aTransitionIds)) { + return; // don't fail if there are no transitions. + } foreach ($aTransitionIds as $iTransitionId) { $res = DBUtil::autoInsert($sTable, array( 'state_id' => $oState->getId(), -- libgit2 0.21.4