Problem/Motivation

Seeing this under 5.4.6-1ubuntu1.1 - my other server, running 5.3, doesn't complain.
Strict warning: Only variables should be passed by reference in boost_block_view_status() (line 62 of /home/staging/public_html/sites/all/modules/boost/boost.blocks.inc).
That's the exact warning I've been getting.

Proposed resolution

Nosing around, for example here:
#1799144: Strict warning: Only variables should be passed by reference in custom_pub_admin() (line 24... custom_pub/custom_pub.admin.inc).,
it looks as if drupal_render() is involved.
Sure enough, changing
#markup' => drupal_render(drupal_get_form('boost_block_flush_form')),
to
'#markup' => drupal_get_form('boost_block_flush_form'),
Seems to have fixed it.

Remaining tasks

I can't roll a patch until tomorrow, and I need to look at beta2 first to see if this is still an issue. May need test/review on a patch.

User interface changes

n/a

API changes

n/a

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpv’s picture

Status: Active » Needs review
FileSize
489 bytes

The solution you propose caused another error in my case. I save the form in a variable before passing it to drupal_render to avoid the strict warning. Here is a patch.

Anonymous’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community
FileSize
557 bytes

I've tested this and it works perfectly, the only suggestion would be to add a one line comment referring back to this thread (as attached).

mpv’s picture

@Philip_Clarke thanks! I have edited your patch to use // instead of # for the comment as the latter is discouraged according to http://drupal.org/node/1354#inline.

Anonymous’s picture

I agree with you though I actually think that

// #1922532

is better as it ties in with the forum shorthand better. I've submitted this to bgm to put into dev or production.

claar’s picture

#3 tested, works great. Thanks!

bgm’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed to 7.x-1.x. Thanks for the patch, and sorry for the long delay.

Status: Fixed » Closed (fixed)

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