Upgraded to php 5.3.1 and got multiple error messages about "expected to be a reference, value given" in calendar, date,.... module. found a patch for all of them, except facted_search. The waring is the usual call by reference warning
warning: Parameter 1 to faceted_search_ui_faceted_search_init() expected to be a reference, value given in .......... \includes\module.inc on line 487.
same problem with faceted_search_query_alter in facted_search_ui. I followed #360605: PHP 5.3 Compatibility a bit and tracked it back to the module_invoke_all calls in faceted_search.inc for faceted_search_init (one time) and faceted_search_ui_faceted_search_query_alter (two times).
I have no idea how to fix that in general and the discussions in #360605: PHP 5.3 Compatibility and other posts were a bit confusing. What I got is that there are problems with moudle_invoke_all calling functions with references??? For now I fixed my problems with replacing module_invoke_all with the actual function call e.g.:
module_invoke_all('faceted_search_init', $this);
replaced by
faceted_search_ui_faceted_search_init($this);
Any idea how to solve that in general? No one else having theses problems??? Thought I at least report it and post my tmp solution as even this took me couple of hours to figure out.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | faceted_search_php53fixes.patch | 1.82 KB | berdir |
Comments
Comment #1
ti2m commentedCould it be that we can just remove the & without worries in case of complex data types being handed in????
then it would suffice to just change faceted_search_ui_faceted_search_query_alter and faceted_search_ui_faceted_search_init in facted_search_ui.module to
and
Comment #2
berdirNo, removing the & would break PHP 4 compatibility. The correct fix is to call the functions directly, as done in the attached patch. Please test and set to RTBC if it works.
Comment #3
David Lesieur commentedPatch committed. Thanks!
Comment #5
ploc commentedHello David,
Do you plan to release a new version of the module, including the patch from Berdir ?
Comment #6
ploc commentedAfter applying the path, I can say that it works well on drupal 6.22 and last version of faceted search.
Patch is ready to be included in a new release of faceted search.
Comment #7
damienmckennaAgreed on the need for another release, even another beta would help everyone. Thanks.