In some cases we might have no changeset value for a field (see for example this other issue:
request #13376). If a workflow is enabled on this field, the retrieval of the workflow information might lead to a PHP fatal error.
Even this situation is not supposed to happen, the code should take into account all possible values exposed by the internal API.
Trace:
PHP Fatal error: Uncaught Error: Call to a member function getValue() on null in /usr/share/tuleap/plugins/tracker/include/Workflow/Workflow.class.php:393"
Stack trace:
#0 /usr/share/tuleap/plugins/tracker/include/Workflow/PostAction/ReadOnly/ReadOnlyFieldDetector.php(46): Workflow->getFirstTransitionForCurrentState(Object(Tracker_Artifact))
#1 /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field.class.php(582): Tuleap\Tracker\Workflow\PostAction\ReadOnly\ReadOnlyFieldDetector->isFieldReadOnly(Object(Tracker_Artifact), Object(Tracker_FormElement_Field_Selectbox))"
#2 /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field.class.php(378): Tracker_FormElement_Field->fetchArtifactValueForWebDisplay(Object(Tracker_Artifact), Object(Tracker_Artifact_ChangesetValue_List), Array)
#3 /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Container.class.php(293): Tracker_FormElement_Field->fetchArtifa...