- Issue created by @dxvargas
@niharika.s your MR is failing the if conditions are not correct
The method \Drupal\state_machine\Plugin\Field\FieldType\StateItem::dispatchTransitionEvent
uses $workflow = $this->getWorkflow()
and right after uses $workflow->findTransition()
.
The problem is that the method getWorkflow()
can return false. In that case, we'll get a the error mentioned in the title.
I can reproduce it in a very specific way that is not really interesting.
Just by looking to the code we ca see the problem.
Check if $workflow an instance of WorkflowInterface
before using it in $workflow->findTransition()
.
Active
1.0
Code
@niharika.s your MR is failing the if conditions are not correct