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.
| Comment | File | Size | Author |
|---|---|---|---|
| project_taxo_selector_php5.patch | 1.81 KB | dww |
Comments
Comment #1
fgmI can confirm it now works here on PHP5.
Comment #2
dwwapplied to HEAD and 4.7
Comment #3
(not verified) commented