Skip to content

Commit

Permalink
Fixes #14013: System notice in bug_check_workflow().
Browse files Browse the repository at this point in the history
If the status workflow is defined, but there is no corresponding entry to the current state, then allow all statuses.  The reasoning is that there should always be at least one possible next status.
  • Loading branch information
vboctor committed Mar 7, 2012
1 parent a817c2c commit ecf22ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/bug_api.php
Expand Up @@ -878,6 +878,11 @@ function bug_check_workflow( $p_bug_status, $p_wanted_status ) {
return true;
}

# There should always be a possible next status, if not defined, then allow all.
if ( !isset( $t_status_enum_workflow[$p_bug_status] ) ) {
return true;
}

# workflow defined - find allowed states
$t_allowed_states = $t_status_enum_workflow[$p_bug_status];

Expand Down

0 comments on commit ecf22ae

Please sign in to comment.