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.

CommentFileSizeAuthor
panels_range_3rd_arg.patch833 bytesdww

Comments

dww’s picture

Note, the CVS logs show:

revision 1.1.2.50
date: 2008-06-02 16:39:07 +0000;  author: merlinofchaos;  state: Exp;  lines: +3 8 -11;  commitid: 6954484422284567;
Change the add pane dialog to an easier to read, more space conservative layout.

So there's no issue for these changes to post this to...

sun’s picture

Status: Needs review » Reviewed & tested by the community

Another good reason to adhere to best practices for commit messages.

Patch and logic looks to be fine.

merlinofchaos’s picture

sun: 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.

pancho’s picture

Status: Reviewed & tested by the community » Fixed

Patch looks reasonable, fixes the problem on PHP4 and works well under both PHP4 and PHP5.
Committed: http://drupal.org/cvs?commit=121922

Anonymous’s picture

Status: Fixed » Closed (fixed)

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