On the Block layout page, I get the following warnings:

Notice: Undefined offset: 0 in formdazzle_add_form_element_suggestions() (line 101 of modules/contrib/formdazzle/formdazzle.module).
Notice: Array to string conversion in formdazzle_add_form_element_suggestions() (line 135 of modules/contrib/formdazzle/formdazzle.module).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dan2k3k4 created an issue. See original summary.

dan2k3k4’s picture

Assigned: Unassigned » dan2k3k4
Status: Active » Needs review
FileSize
4.01 KB
dspachos’s picture

Some times $element['#theme_wrappers'] contains container render element as nested array. Remove to avoid notice for array to string conversion (and add again after merge).

JohnAlbin’s picture

Re-rolled without all the code formatting that was fixed in #3178145: Update code syntax using phpcs/phpcbf

JohnAlbin’s picture

FileSize
6.94 KB

I realized I can get rid of the whole array_unique(array_merge mess by using the array + operator like Drupal\Core\Render\Renderer::doRender() does.

And I'm also checking the wrong array indices so the code that is throwing the undefined offset is doubly wrong.

Here's the new patch

  • JohnAlbin committed 494c4b6 on 2.x
    Issue #3089028 by JohnAlbin, dspachos, dan2k3k4: Undefined offset and...
JohnAlbin’s picture

Assigned: dan2k3k4 » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.