Hello,
I am using the latest files from 7.x-dev and it appears that because of a sudden change in the files (i couldn't find any specific one) i've started to recieve warnings in my front page which is default node listing of drupal.
The error message is;
Notice: Undefined offset: 188 in _field_invoke_multiple() (line 351 of /home/..../modules/field/field.attach.inc).
My solution is;
File: field.attach
Line: 351
Change:
if ($grouped_items[$field_id][$langcode][$id] !== array() || isset($entity->{$field_name}[$langcode])) {
To:
if (isset($grouped_items[$field_id][$langcode][$id]) && ($grouped_items[$field_id][$langcode][$id] !== array() || isset($entity->{$field_name}[$langcode]))) {
I believe the error is because of empty arrays.
Waiting feedback and comment on this.
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1164240.patch | 1.28 KB | droplet |
Comments
Comment #1
droplet commenteddo empty() check on empty array().
same patch working on D7&8
Comment #3
droplet commented#1089174: Prepare view hooks do not receive the language parameter