Warning on Preview

khawaja - February 18, 2009 - 08:35
Project:Blog reactions
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Every time I preview a node I get the following warning:

warning: Invalid argument supplied for foreach() in /home/powrslns/public_html/kookyguides.com/sites/all/modules/blog_reactions/blog_reactions.module on line 451.

Everything seems to be working fine, regardless.

#1

dereine - March 27, 2009 - 11:54
Status:active» needs review

the problem is that node_preview doesn't load the item, so $node->blog_reactions['items'] is really empty, and then foreach fails.

here is a patch which checks first for $node->blog_reactions

AttachmentSize
blog_reactions-376168.patch 821 bytes

#2

sanduhrs - March 30, 2009 - 08:18
Status:needs review» fixed

Commited to 6-dev.
Backported to 5-dev.
Thanks.

#3

System Message - April 13, 2009 - 08:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.