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);
CommentFileSizeAuthor
uc_hotel-render_get_form.patch1.32 KBzany
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

larowlan’s picture

Issue tags: +Release blocker

Thanks
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

zany’s picture

Happy 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.

larowlan’s picture

Status: Needs review » Fixed

Fixed in dev version

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