Skip to content
Snippets Groups Projects
Commit 137fb5c4 authored by John Voskuilen's avatar John Voskuilen
Browse files

Issue #3521370: WorkflowState::loadMultiple() must not load so many states

parent 16c8aa88
Branches 8.x-1.x
No related tags found
No related merge requests found
Pipeline #482827 passed with warnings
......@@ -207,7 +207,7 @@ class WorkflowState extends ConfigEntityBase implements WorkflowStateInterface {
public static function loadMultiple(?array $ids = NULL, $wid = '', $reset = FALSE) {
static $states = NULL;
// Avoid PHP8.2 Error: Constant expression contains invalid operations.
if ($states ??= parent::loadMultiple()) {
if (!$states && $states ??= parent::loadMultiple()) {
// Sort the States on state weight.
// @todo Sort States via 'orderby: weight' in schema file.
uasort($states, [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment