I can't find this in the buglist so I have filed it, but since it is rather obvious it probably already is there somewhere, if someone knows please mark duplicate and link to other issue. This is tested agains a fresh cvs-download.
In "includes/form.inc" there is a check (line 519) elseif (!isset($options[$elements['#value']])) { which I believe fails because the function "form_options_flatten" is wrong. The flatten-function
function form_options_flatten($array, $reset = TRUE) {
static $return;
if ($reset) {
$return = array();
}
foreach ($array as $key => $value) {
if (is_array($value)) {
form_options_flatten($value, FALSE);
}
else {
$return[$key] = 1;
}
}
return $return;
}
is passed an array of objects
[#options] => Array
(
[0] => stdClass Object
(
[option] => Array
(
[6] => Beef
)
)
[1] => stdClass Object
(
[option] => Array
(
[7] => Burger
)
)
but the functions seems expects something else it returns an options-array something like this
Array
(
[0] => 1
[1] => 1
[2] => 1
[3] => 1
[4] => 1
)in this case, if the term-id is higher the 4 this will result in an error.
Can easily be reproduced by creating two categories and then creating some terms. Assign both categories to page, and try to create a new page.
Comments
Comment #1
Kjartan commentedhttp://drupal.org/node/24023#comment-150296