Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved get_status_option_list() function
Previous behavior to return all available values for the status enum when the workflow is not set for the given status, could potentially result in a security issue (letting the user bypass the workflow). The function now returns an empty array in this case, leaving it up to the caller to handle a possibly empty list. Simplified and optimized the test in the foreach loop. Do not add 'closed' status to the list if it is the current status. Added PHPdoc function header. Affects #11661, #14156
- Loading branch information
Showing
1 changed file
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters