fgm (osinet on IRC) reported some troubles getting the taxonomy selector stuff (http://drupal.org/node/64221) working on his site. after debugging it for a while, i realized that i was doing something relatively dumb, which php4 was willing to allow, but php5 decided to nail me for. ;)

when setting up the form for the project, i was defining each 2nd-level term in the project taxonomy (the "categories", not "project type") in a form element, named via the term id (tid) of that specific term. so, i basically had:

$form['project_taxonomy'][5] = array(...);

php4 was happy with this, and let me get away with it, but php5 refuses. so, now i'm doing this, instead:

$form['project_taxonomy']["tid_$tid"] = array(...);

or, for example:

$form['project_taxonomy']["tid_5"] = array(...);

then, the places during validate() and nodeapi() where we're saving the project taxonomy, we look for the new value, and everything's happy and good on both php4 and php5.

CommentFileSizeAuthor
project_taxo_selector_php5.patch1.81 KBdww

Comments

fgm’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm it now works here on PHP5.

dww’s picture

Status: Reviewed & tested by the community » Fixed

applied to HEAD and 4.7

Anonymous’s picture

Status: Fixed » Closed (fixed)