Array must contain atleast one element (line 401)

marc.bau - September 1, 2006 - 22:17
Project:Panels
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

1. i have removed the right side column of a two column panel.
2. added content to the panel with one node listed under "Enter the title or NID of a post"
3. pressed save
4. got the error: warning: max() [function.max]: Array must contain atleast one element in c:\Inetpub\wwwroot\drupal\modules\panels\panels.module on line 401.

#1

marc.bau - September 1, 2006 - 22:18

3. correction - i pressed the "add post" button.

#2

marc.bau - September 2, 2006 - 12:44

this is always reproduceable if you delete the node (if only one exist) from one column and re-add content to this column...

#3

t4him - December 29, 2006 - 13:31

submit #2 is correct. I had the same issue but with the top panel area. I inserted the incorrect content in the top and saved the page. When I viewed the page i realized the mistake. Edited the panel, "Oops-ed" the top content, added the correct content and "WHAM!", the error.

#4

Summit - December 29, 2006 - 14:29

Will somebody please get into this.
It is a very strange bug what comes up when I change my panel content.
Please help!

And by the way a very good yearending to everyone!
May drupal continu at this speed in 2007!!

greetings,
Martijn

#5

t4him - December 29, 2006 - 15:37

Will somebody please get into this.

We'll, I DEFINETLY would not go there.

This bug is not intrusive, just a warning. The panel still works.

#6

Summit - January 28, 2007 - 14:40
Status:active» fixed

I agree, sorry for my first lines :)
The panels works fine, you only get a warning.

greetings,
Martijn

#7

hass - January 28, 2007 - 14:47
Status:fixed» active

@Martijn: this is a bug and it should be fixed, nevertheless there is a workaround. Do not switch the case to fixed until the bug is really fixed, please. Thank you.

#8

RobRoy - March 9, 2007 - 00:03
Version:4.7.x-1.x-dev» 5.x-1.0
Status:active» needs review

This actually screws with my panels and is not just a warning on PHP 5.2.1.

The patch fixes the problem by making sure the $order is not empty as well.

AttachmentSize
panels_1.patch 960 bytes

#9

merlinofchaos - March 15, 2007 - 19:29
Status:needs review» fixed

Thanks for the patch!

#10

Anonymous - March 29, 2007 - 19:32
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.