Skip to content
Snippets Groups Projects

Issue #3295818: TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -593,7 +593,7 @@ class EntityEmbedDialog extends FormBase {
@@ -593,7 +593,7 @@ class EntityEmbedDialog extends FormBase {
*/
*/
public function validateSelectStep(array $form, FormStateInterface $form_state) {
public function validateSelectStep(array $form, FormStateInterface $form_state) {
if ($form_state->hasValue(['entity_browser', 'entities'])) {
if ($form_state->hasValue(['entity_browser', 'entities'])) {
if (count($form_state->getValue(['entity_browser', 'entities'])) > 0) {
if (!empty($form_state->getValue(['entity_browser', 'entities']))) {
$id = $form_state->getValue(['entity_browser', 'entities', 0])->id();
$id = $form_state->getValue(['entity_browser', 'entities', 0])->id();
}
}
$element = $form['entity_browser'];
$element = $form['entity_browser'];
Loading