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
Comment | File | Size | Author |
---|---|---|---|
#3 | boost-remove_strict_warning-1922532-3.patch | 558 bytes | mpv |
#2 | boost-remove_strict_warning-1922532-2.patch | 557 bytes | Anonymous (not verified) |
#1 | boost-remove_strict_warning-1922532-1.patch | 489 bytes | mpv |
Comments
Comment #1
mpv CreditAttribution: mpv commentedThe 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.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedI'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).
Comment #3
mpv CreditAttribution: mpv commented@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.Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI 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.
Comment #5
claar CreditAttribution: claar commented#3 tested, works great. Thanks!
Comment #6
bgm CreditAttribution: bgm commentedCommitted to 7.x-1.x. Thanks for the patch, and sorry for the long delay.