warning after enabling this module - Call-time pass-by-reference has been deprecated

igorik - August 21, 2007 - 13:14
Project:Fuzzy Search
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Hi, after I enable this module, I got this warning message on each page:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of module_invoke_all(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/somvprahe.sk/somvprahe.sk/www/sites/all/modules/fuzzysearch/fuzzysearch.module on line 297

Igor
somvprahe.sk

#1

BlakeLucchesi - August 21, 2007 - 18:10
Status:active» fixed

This was caused by a call to invoking all modules with a preprocess hook that allows them to filter out words from the index before the node is indexed. I have removed this line in the latest dev snapshot and will look for a better way to implement it in the future versions.

Thanks for the report.

#2

alliax - September 1, 2007 - 04:36
Version:5.x-1.2» 5.x-1.x-dev

I've just installed the dev version of today and I got the same PHP warning

#3

BlakeLucchesi - September 1, 2007 - 05:57
Status:fixed» active

The dev version as of sept 1st does not have this error, nor should the last version have. I'm not sure what is going on, but I just redownloaded it and the line you noted the error on is a comment. You may want to try re-downloading the latest dev snapshot, I'm certain its all working as I tried it myself today on 3 different installations just to make sure all the install issues were handled.

If it still doesn't work please do follow up and I will try to debug it further.

Thanks,
Blake

#4

olio - September 15, 2007 - 13:25

Hi,
I just installed both available versions (first 1.2, then the dev-version) and got the same error. In my case, Drupal complaints about another line in the module's code (319).
Here's the warning message:

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of module_invoke_all(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /is/htdocs/wp1047547_E9BWYAUVHP/www/subdomain/sites/all/modules/fuzzysearch/fuzzysearch.module on line 319

Thanks.

#5

archetwist - October 10, 2007 - 23:04

I can confirm this. Same version of the module and same error message.

#6

The Computer Au... - November 29, 2007 - 04:43

same issue here

#7

robertlam - April 4, 2008 - 11:17

Well, has the author given up?

#8

appel - June 12, 2008 - 14:04

That would be a shame, but it seems to be the case.

For what its worth: disabling lines 318, 319 & 320 in fuzzysearch.module gets rid of the error, though I haven't tested for any side effects:

<?php
318
#  if (variable_get('search_stop_words', false)) {
319 #    module_invoke_all('search_filter', &$text);
320 #  }
?>

#9

gh0st25 - June 30, 2008 - 16:08

Yep, confirmed here too.

#10

phayes - July 4, 2008 - 04:00

You dont need to remove that entire line of code - just remove the pass-by-reference like so

  // Strip all stop words if stop words are enabled
  if (variable_get('search_stop_words', false)) {
    module_invoke_all('search_filter', $text);
  }

 
 

Drupal is a registered trademark of Dries Buytaert.