- Issue created by @freelylw
- πΊπΈUnited States argiepiano
This warning is a regression introduced by this commit, as part of this issue π Weight default value is an array, error when saving Fixed .
The problem here happens in the Manage field UI, when adding a new weight field. When you add a new field, weight_field_widget_form() receives an empty array in the $items parameters. The new (faulty) code added in the commit above doesn't check to see if the key 'value' exists.
- πΊπΈUnited States argiepiano
The patch in #3 doesn't solve the warning. It does set the default value to 0, which is needed, but the warning persists.
- Merge request !15Issue #3280618 by piotrsmykaj: Trying to access array offset on value of type... β (Closed) created by argiepiano
- Open on Drupal.org βCore: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Not currently mergeable. - Open on Drupal.org βCore: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Not currently mergeable. - Open on Drupal.org βCore: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Not currently mergeable. - Merge request !163359734-undefined-offset-0-weight_field_widget_form β (Open) created by argiepiano
- Open on Drupal.org βCore: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Not currently mergeable. - πΊπΈUnited States argiepiano
I've submitted a merge request. Sorry, I haven't done patches and requests for Drupal for a few years, and I think the workflow is not different. Apologies if this was not done correctly.
- πΊπΈUnited States argiepiano
argiepiano β changed the visibility of the branch 7.x-3.x to hidden.
- πΊπΈUnited States argiepiano
argiepiano β changed the visibility of the branch 7.x-3.x to active.
Change line 72 to:
elseif (isset($items) && is_array($items) && array_key_exists($delta, $items) && is_array($items[$delta]) && array_key_exists('value', $items[$delta])) {