Line 1448, there is a foreach loop that gets called and it expects $items to have something.

Since the favourites module is enabled and I don't have any favourites supplied, there's nothing for it to expand in the foreach loop which gives the foreach php error.

In this patch I just stuck an if ($items) wrapped around the foreach.

Don't know if it's good enough.

Let me know.

CommentFileSizeAuthor
#1 favorite_nodes_empty_list_break.patch769 bytesAnonymous (not verified)
user_multiple_profile_items.patch1.37 KBAnonymous (not verified)

Comments

Anonymous’s picture

Project: Drupal core » Favorite Nodes
Version: x.y.z » master
Component: user.module » Code
StatusFileSize
new769 bytes

Thought it was an issue with user.module but it's actually favorite_nodes .

Here's the fix for it.

wafaa’s picture

Assigned: Unassigned » wafaa
Status: Needs review » Fixed

Thanks. Committed to drupal HEAD and 4.7

Anonymous’s picture

thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)