Hi, I have a node with a user field (userreference) for adding additonal edit access for node maintainers. Under some circumstances I get the the following error:

warning: Invalid argument supplied for foreach() in E:\esg\sites\all\modules\nodeaccess\nodeaccess.module on line 849.

it is the inner foreach loop of function nodeaccess_delete_userreference($node) .

In one example $fields gets initialized as

Array
(
    [field_ansprechpartner] => Array
        (
            [gid] => nodeaccess_uid
            [enabled] => 1
            [grant_view] => 1
            [grant_update] => 1
            [grant_delete] => 1
        )

)

but the field field_ansprechpartner is not availlable in $node (as well as several other fields which can be seen from a computed field).

The error occurs for example if I convert a story or page to a content type which has the field ansprechpartner.

Comments

vlad.pavlovic’s picture

Issue summary: View changes
Status: Active » Fixed

Fixed, I will push to dev version later today. Thank you.

Status: Fixed » Closed (fixed)

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