Using $id = reset(entity_extract_ids($type, $entity)); causes a PHP notice/strict error. Proper code is to do list($id) = entity_extract_ids($type, $entity);

Comments

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new1.52 KB
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks like a reasonable fix to me. Dave also assures me similar problems do not exist in core code (just in these examples; would have been found by the testing bots if in core code).

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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