🐛 | Drupal core | Using $form_state->getValue() in BlockBase's blockForm throws "subform and parent form must contain the #parents property" exception
🇮🇳India saurabh.tripathi.cs
🐛 | Drupal core | Using $form_state->getValue() in BlockBase's blockForm throws "subform and parent form must contain the #parents property" exception
🇮🇳India saurabh.tripathi.cs
Is there a patch for D10?
i have changed #56 a bit to match with D10
/**
* {@inheritdoc}
*/
public function &getValues() {
$exists = NULL;
if ($this->isProcessingInput()) {
$values = &NestedArray::getValue(parent::getValues(), $this->getParents('#parents'), $exists);
}
else {
@trigger_error("Please don't.", E_USER_DEPRECATED);
}
if (!$exists) {
$values = [];
}
if (!is_array($values)) {
throw new \UnexpectedValueException('The form state values do not belong to the subform.');
}
return $values;
}
🇮🇳India saurabh.tripathi.cs
saurabh.tripathi.cs → created an issue.