Posted by digi24 on November 7, 2009 at 1:40am
Jump to:
| Project: | Hierarchical Select |
| Version: | 6.x-3.x-dev |
| Component: | Code - Taxonomy |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hey,
please correct me, if I am wrong, but should $form_state be really passed by reference? (it creates trouble for me, when using the functions from a custom module.
Index: hierarchical_select/modules/hs_taxonomy.module
===================================================================
--- hierarchical_select/modules/hs_taxonomy.module (revision 1003)
+++ hierarchical_select/modules/hs_taxonomy.module (working copy)
@@ -227,7 +227,7 @@
/**
* Implementation of hook_form_alter().
*/
-function hs_taxonomy_form_alter(&$form, &$form_state, $form_id) {
+function hs_taxonomy_form_alter(&$form, $form_state, $form_id) {
// Change the term selection of nodes. Only affects hierarchical
// vocabularies.
if (isset($form['type']) && isset($form['#node']) && (variable_get('taxonomy_override_selector', FALSE)) && $form['type']['#value'] .'_node_form' == $form_id) {
Comments
#1
Interesting. I suppose that's indeed not needed. Probably a typo or copy/paste error.
If you can confirm everything keeps working for you, I'll commit it.
#2
It works for me and my users.
I haven't tested it in a setup with multiple hs forms, but as far as I can see, the function is not altering any $form_state data, its only checking for preview, so it should not make any difference.
Setting to "needs review" in case someone else would like to check too, but in my opinion it can be committed.
#3
Sorry for the late commit … but now I finally did! :) This was extremely minor anyway :)
http://drupal.org/cvs?commit=335080
#4
Automatically closed -- issue fixed for 2 weeks with no activity.