Commit 8304bbb111b8795eda88d43e2df2d2c6f89a5099
1 parent
35f462d7
fix for BBS-354: if removing all transitions, don't throw an error.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5592 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
0 deletions
lib/workflow/workflowutil.inc.php
| ... | ... | @@ -66,6 +66,9 @@ class KTWorkflowUtil { |
| 66 | 66 | return $res; |
| 67 | 67 | } |
| 68 | 68 | $aOptions = array('noid' => true); |
| 69 | + if (empty($aTransitionIds)) { | |
| 70 | + return; // don't fail if there are no transitions. | |
| 71 | + } | |
| 69 | 72 | foreach ($aTransitionIds as $iTransitionId) { |
| 70 | 73 | $res = DBUtil::autoInsert($sTable, array( |
| 71 | 74 | 'state_id' => $oState->getId(), | ... | ... |