Closed (fixed)
Project:
Drupal For Firebug
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Anonymous (not verified)
Created:
25 May 2011 at 20:34 UTC
Updated:
19 Jun 2015 at 02:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedHello,
I got the same error on another module I was trying out, and the solution found for it was to split the function into two calls. So in this case, on line 273 in file drupalforfirebug.module I get this:
$output .= drupal_render(drupal_get_form('drupalforfirebug_execute_form'));
and it generates the error mentionned, so I just splitted to get:
$dff_exec_form = drupal_get_form('drupalforfirebug_execute_form');
$output .= drupal_render($dff_exec_form);
and the error is gone... Since I'm new into php coding, I cannot explain why is this so, maybe someone has a better way to solve this.
Hope it helps.
Comment #2
esod commentedbucketride's suggestion works for me too. I've attached the patch. Thanks.
Comment #3
frank ralf commentedPatch applies ok and gets rid of the error message. Thanks! Setting this to reviewed & tested.
drupal_render(&$elements) requires an array passed by reference, whereas drupal_get_form($form_id) returns a literal array from a function call. That might trigger the error message but shouldn't have any other effect.
Comment #4
Daniel_KM commentedHi,
Thanks for the patch. I hope it will be committed soon.
Sincerely,
Daniel Berthereau
Infodoc & Knowledge management
Comment #5
frobComment #6
frobThis has been rolled into the dev branch, after a few more of these issues are cleared we will roll out a new minor release.
Comment #7
frobComment #8
frank ralf commentedThanks!
Comment #10
bfr commentedFor those who are interested, this is a bug in Drupal core handling some stricts incorrectly. The way you fixed it is exactly the suggested way of dealing with it.