- Issue created by @andrei.vesterli
- 🇲🇩Moldova andrei.vesterli Chisinau
Here is the attached patch with the fix
- last update
about 1 year ago Composer require failure - Open in Jenkins → Open on Drupal.org →Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7 w/Bullseye Upgradeslast update
about 1 year ago 1 pass - Merge request !12Fix the warning issue after menu item saving. → (Closed) created by andrei.vesterli
- last update
about 1 year ago Composer require failure - Issue was unassigned.
- Status changed to Needs review
about 1 year ago 9:30pm 3 November 2023 - last update
about 1 year ago Composer require failure - 🇦🇹Austria agoradesign
With the given patch from #2, there's the risk of running into an error:
TypeError: array_merge(): Argument #2 must be of type array, null given in array_merge() (line 191
This seems to happen, when the user does not have the 'use menu link attributes' permission set
I've updated the patch to ensure an empty array, if the value is not set
- 🇨🇿Czech Republic milos.kroulik
Based on the patch in #6 it looks like this is actually a duplicate of https://www.drupal.org/project/menu_link_attributes/issues/3331630 🐛 Compatibility with other modules, options being overwritten. Fixed , which is already RTBC. Can we close this one?
- Status changed to Closed: duplicate
8 months ago 9:21am 14 May 2024 - 🇩🇪Germany Anybody Porta Westfalica
🐛 Compatibility with other modules, options being overwritten. Fixed has already been fixed. Closing this as duplicate.
- 🇧🇬Bulgaria alexrayu
Sadly the other mentioned issue did not resolve this specific error - variables passed to NestedArray::MergeDeep() can still be NULL, which causes a warning. Reworked the previous patch to also check the second variable passed. If someone still has this error in ^1.5.0, you can check this patch.
- First commit to issue fork.
- 🇧🇪Belgium dtfabio Ninove
Hi Anybody,
I am also still experiencing the same problem that the code gives a warning if the arrays passed to NestedArray::mergeDeep() contain a NULL value.
In my case, this happened logged in as webmaster, given the webmaster had no permissions to add attributes to the menu link item.
I have included alexrayu's code in an MR with one more check in case the user has no attribute add permissions, given that at this place a NULL was still passed to the mergeDeep function later in the code.
Behaviour without patch:
After adding the patch:
Would it be possible to review the change, so that a solution to this problem can be included in a future release?
Greetings,
Fabio
- Merge request !32Resolve #3399153 "Fix warning on nested array merge deep array" → (Merged) created by dtfabio
Automatically closed - issue fixed for 2 weeks with no activity.