Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
PHP limits argument passing by reference to variables. Using render(drupal_get_form(...)) results in a warning:
Strict warning: Only variables should be passed by reference in hotel_booking_view() (Line 386 of uc_hotel/hotel_booking/hotel_booking.room_type.inc).
Because http://api.drupal.org/api/drupal/includes--common.inc/function/render/7 declares it's argument to be passed by reference and a plain call to drupal_get_form() is not strictly a variable (which could be modified).
TL;DR:
- ... render(drupal_get_form(...));
+ $form = drupal_get_form(...);
+ render($form);
Comment | File | Size | Author |
---|---|---|---|
uc_hotel-render_get_form.patch | 1.32 KB | zany |
Comments
Comment #1
larowlanThanks
as you can tell, the 7.x version hasn't had much work done in a while. With UC and Views, Rules etc approaching stable releases, it may be time to give it some love...
LR
Comment #2
zany CreditAttribution: zany commentedHappy to help. Most of the work is already done, the least I can do is some debugging.
I need a simple room booking system ready in a few months. I thought I'd give D7 a try here.
Comment #3
larowlanFixed in dev version