Closed (fixed)
Project:
Panels
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Jun 2008 at 22:41 UTC
Updated:
2 Jul 2008 at 02:33 UTC
In revision 1.1.2.50, merlinofchaos added the following to panels_add_content():
foreach (range($columns, 2, -1) as $column) {
However, check out the PHP docs for range():
http://us2.php.net/manual/en/function.range.php
2 problems here:
1) the 3rd arg is supposed to be positive.
2) the 3rd arg is only PHP5 -- at this point, panels works fine in PHP4 based on my testing -- it'd be a shame to introduce a PHP4 dependency just for this.
The good news is that the docs state: "If low > high, the sequence will be from high to low.", so the -1 is useless. If you rip it out, everything seems to work as intended, even on PHP4.
See attached patch.
| Comment | File | Size | Author |
|---|---|---|---|
| panels_range_3rd_arg.patch | 833 bytes | dww |
Comments
Comment #1
dwwNote, the CVS logs show:
So there's no issue for these changes to post this to...
Comment #2
sunAnother good reason to adhere to best practices for commit messages.
Patch and logic looks to be fine.
Comment #3
merlinofchaos commentedsun: No offense but I am not going to go to the extra work of creating issues just to commit new changes. I have enough work to do.
Comment #4
panchoPatch looks reasonable, fixes the problem on PHP4 and works well under both PHP4 and PHP5.
Committed: http://drupal.org/cvs?commit=121922
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.