This looks like a typo in menu_links_features_export_render() where this:

menu_link_save($temp = $link);

I think this should be:

menu_link_save($link);

Comments

Anonymous’s picture

Confirm same issue occurs for me when packaging menu and menu items in a features.

Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
Strict warning: Only variables should be passed by reference in menu_links_features_export_render() (line 244 of /Users/XXXXXX/localhost/XXXXXX/sites/all/modules/contrib/features/includes/features.menu.inc).
idebr’s picture

Status: Active » Needs review
StatusFileSize
new590 bytes

I was able to reproduce the notice by exporting any menu link. Attached is a patch based on the solution presented in the issue summary. It's safe to remove the $temp assignment, since the variable is not used in the function. See my comment in #3

idebr’s picture

Actually menu_link_save takes an argument by reference, that is what the $temp assignment is for. Attached is a revised patch.

NaX’s picture

Status: Needs review » Reviewed & tested by the community

Agreed, I test the last patch and works as described.

ehijzen’s picture

Patch works as described

miromarchi’s picture

patch in #3 works for me as well. thanks

honza pobořil’s picture

westwesterson’s picture

tested #3, works great.

manuelBS’s picture

patch #3 works for me as well. Thanks!

hefox’s picture

Status: Reviewed & tested by the community » Fixed

thanks

  • Commit ffb97cc on 7.x-2.x authored by idebr, committed by hefox:
    Issue #2155945 by idebr: Strict warning: Only variables should be passed...

Status: Fixed » Closed (fixed)

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