[Tickets #1388] RESOLVED: Can't create forum
bugs@bugs.horde.org
bugs at bugs.horde.org
Sat Jan 14 10:43:51 PST 2006
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=1388
-----------------------------------------------------------------------
Ticket | 1388
Updated By | ben at alkaloid.net
Summary | Can't create forum
Queue | Agora
State | Bogus
Priority | 2. Medium
Type | Bug
Owners |
-----------------------------------------------------------------------
ben at alkaloid.net (2006-01-14 10:43) wrote:
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.
More information about the bugs
mailing list