When I visit "Add a suggestion type" (or when I edit an existent one), I get the following error:

Deprecated function: Call-time pass-by-reference has been deprecated in menu_execute_active_handler() (line 515 of /…/includes/menu.inc).

This was mentioned too in
#1312488: Call time pass-by-reference deprecated warnings on PHP 5.2.13
#1515438: Call-time pass-by-reference has been deprecated

Comments

no2e’s picture

Will this be (back)ported from #1459580: PHP Warning: Call-time pass-by-reference [Drupal 6 Patch Attached], or this is a different issue?

voj’s picture

Version: 7.x-2.3 » 6.x-2.3
Status: Active » Needs review

On drupal 6x-2.3 of Search Autocomplete, I confirmed that the installation file got an error on it.
this code will be similar to 7.x-2.x-dev but not the same.

search_autocomplete.install
on line 273:

    $ret = array();
    db_add_field(&$ret, 'search_autocomplete_suggestions', 'sug_query', 
      array( 
        'description' => 'The database query for this suggestion',
        'type' => 'varchar',
        'length' => 512,
        'not null' => TRUE,
        'default' => '',
      )
    );

the &$ret is using a reference which shows an error. there's no point of using the &$ret when declaring it as variable.

just change the line
db_add_field(&$ret, 'search_autocomplete_suggestions', 'sug_query',
and remove the &(amp) sign before $ret
db_add_field($ret, 'search_autocomplete_suggestions', 'sug_query',

on 7.x-2.x-dev
just follow the error line then remove the &(amp) sign before the variable.

Please post a patch on this. I don't know the format or how it's done.

voj’s picture

Version: 6.x-2.3 » 7.x-2.x-dev
rooby’s picture

This is different to the one mentioned in the other issue.

Here is a patch that fixes it.

dom.’s picture

Status: Needs review » Closed (fixed)

Thanks for patch !

Let me close the issue. Indeed, I'm currently starting version 3.x in which this code does not exists anymore.

Thanks a lot for your help !
Miro.

rooby’s picture

Status: Closed (fixed) » Needs review

Does that mean this was committed, because it doesn't look like it was from commit messages?

Since the 2.x branch is the recommended release and the 3.x branch will not be ready for an undefined amount of time, can bug fix patches still be applies to 2.x where they are supplied & reviewd by the community?

Or will the 3.x branch be ready very soon and have a nice upgrade path from 2.x?

dom.’s picture

Hi !

You should see the 3.0-rc1 here on the module page :
http://drupal.org/project/search_autocomplete
However, there is no nice upgrade path since one can input it's own SQL statement. Version 3.x does not use SQL anymore but PHP callback or views. I can't "analyze" every custom SQL to make it as a Views, so configuration has to be made again unfortunately.

Note also that your patch is applied to version 2.4 which has been available for a few time now.

Thanks,
Miro

rooby’s picture

Status: Needs review » Fixed

Thanks, I will definitely look into the 3.x version too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.