Closed (fixed)
Project:
Location
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2009 at 18:41 UTC
Updated:
26 Apr 2010 at 05:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
agentrickardConfirmed.
Comment #2
nickl commentedShould the protecting if statements not check for arrays instead of checking if the value is set positively.
And also :
Because the foreach will still fail if $fields = 3; for example.
Comment #3
nickl commentedRolled new patch with above suggestions implemented.
Comment #4
therealwebguy commentedYes this is correct nicki, if a value is passed that is not an array, the if will return true in my condition still leaving the foreach to generate a warning. Thanks for the update and drilling in the specifics.
Comment #5
yesct commentedSomeone please confirm that this applies to the current dev (to see if it needs a re-roll) and does not break anything.
This might be a nice patch to test for someone who has never reviewed a patch before:
http://drupal.org/patch/review
Comment #6
hutch commentedlocation_26.patch applies cleanly and testing with is_array before iteration makes good sense to me.
tested on latest dev, although I did not attempt to force an error, not sure how and don't think it's necessary.
I would recommend this patch
Comment #7
yesct commentedComment #8
ankur commentedCommitted to HEAD, DRUPAL-6--3
Comment #9
yesct commentedhttp://drupal.org/cvs?commit=353314
http://drupal.org/cvs?commit=353312