Problem/Motivation

A very simple thing but one worth pointing out...

After a clean install and when visiting the admin page (admin/people/users/redirect/form/settings) for the first time,

I see the following message...

otice: Trying to access array offset on value of type null in Drupal\user_redirect\Form\UserRedirectSettingsForm->buildForm() (line 149 of modules/user_redirect/src/Form/UserRedirectSettingsForm.php).
Drupal\user_redirect\Form\UserRedirectSettingsForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 531)
Drupal\Core\Form\FormBuilder->retrieveForm('config_settings_form', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)...

A subsequetn TWO MORE saves, removes the error message.

CommentFileSizeAuthor
#2 3268523-2.patch1.98 KBlarisse

Comments

SirClickALot created an issue. See original summary.

larisse’s picture

Status: Active » Needs review
StatusFileSize
new1.98 KB

Hello! Here's a patch to solve this. Can you review, please? :)

victoria-marina’s picture

Assigned: Unassigned » victoria-marina

I'll review this.

victoria-marina’s picture

Assigned: victoria-marina » Unassigned
Status: Needs review » Reviewed & tested by the community

The #2, successfully removed the warning. RTBC!

vipin.mittal18’s picture

Assigned: Unassigned » vipin.mittal18
Status: Reviewed & tested by the community » Fixed

Thanks very much Larisse for the patch.

New version has been released. Refer https://www.drupal.org/project/user_redirect/releases/1.0.2

vipin.mittal18’s picture

Status: Fixed » Closed (fixed)