This error is shown when submitting the config form.
"Cannot use object of type Drupal\Core\Form\FormState as array"

This is due to the fact that the FormState isn't an array any more, but an object. Use $form_state->getValue('key_name');

CommentFileSizeAuthor
#3 2807925.patch8.16 KBWeb-Beest
#2 2807925.patch31.34 KBWeb-Beest
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Web-Beest created an issue. See original summary.

Web-Beest’s picture

FileSize
31.34 KB
Web-Beest’s picture

FileSize
8.16 KB

Reworked patch.

drupalguy854’s picture

Is there a way to get all the form_state variables that are in there and print them to the screen with a function like echo var_export($formstatevariablehere) without specifying just one key?