6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
9/7/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#1388] Can't create forum
*
Your Email Address
*
Spam protection
Enter the letters below:
. . .. . __ . . |\ | || |/ `|__| | \|\__||__|\__.| |
Comment
> The problem appears to be related to the type of variable submitted > by form. When no forums are present the form only lists one option > in the dropdown box: "-- Top Level--" with a value of "-1". When > this is submitted by form back to the server this becomes the STRING > "-1". The array however is populated with the INTeger -1. This > behavior is documented on php's website at > > http://us3.php.net/manual/en/language.types.array.php#37535 > > > > I verified this by gettype()ing the two variables $value and the keys > of $this->_values in HORDE_BASE/lib/Horde/Form.php on line 2081. > Since this could theoretically be a larger problem in forms which use > enums with negative array indices I'm not sure how to proceed. To > solve this problem for me for now I am coercing the value to an int > in AGORA_BASE/editforum.php on line 49 with the following ugly > workaround: > > $vars->set('forum_parent_id', (int) $vars->get('forum_parent_id')); > > > > I leave it to the Horde team to decide the proper corrective action.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers