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.
There are some errors caused by a wrong array definition in PHP, like:
Warning: Illegal string offset 'rooms_children_discount_options' in UnitPricingCalendar->calculatePrice() (line 75 of .../rooms/modules/rooms_pricing/includes/rooms_pricing.unit_pricing_calendar.inc).
Notice: Array to string conversion in UnitPricingCalendar->calculatePrice() (line 75 of .../rooms/modules/rooms_pricing/includes/rooms_pricing.unit_pricing_calendar.inc).
Warning: Illegal string offset 'rooms_price_calculation' in UnitPricingCalendar->calculatePrice() (line 76 of .../rooms/modules/rooms_pricing/includes/rooms_pricing.unit_pricing_calendar.inc).
Warning: Illegal string offset 'pricing_events' in UnitPricingCalendar->calculatePrice() (line 79 of .../rooms/modules/rooms_pricing/includes/rooms_pricing.unit_pricing_calendar.inc).
Notice: Array to string conversion in UnitPricingCalendar->calculatePrice() (line 79 of .../rooms/modules/rooms_pricing/includes/rooms_pricing.unit_pricing_calendar.inc).
Those errors are caused because what is supposed to be an array is being declared as an empty string.
Comments
Comment #2
juankvillegas CreditAttribution: juankvillegas commentedComment #3
aken.niels@gmail.comSeems to do the trick, small note though, that this patch's root path is from outside the module folder.
Comment #4
juankvillegas CreditAttribution: juankvillegas commentedHere is a fixed patch from module's folder.
Comment #5
adci_contributor CreditAttribution: adci_contributor at ADCI Solutions commentedYour patch still isn't appliable neither through 'patch -p1' nor 'drush make'. Here is the right one.
Comment #6
SkinOn my fresh Rooms installation with php 7.2 Patch #5 is working for me, may be someone can test and commit?
Comment #7
Sherydan CreditAttribution: Sherydan commentedHave a fresh D7 rooms too, #5 worked for me. Agree with @Skin, I guess someone got to commit that.
Comment #8
ducdebreme CreditAttribution: ducdebreme commentedI think, it is worth explicitly mentioning that this is a bug, which only occurs with PHP 7.2 and above.
I tracked it down myself and afterwards discovered it in the issue queue.
Comment #11
acrollet CreditAttribution: acrollet commentedCommitted, thanks for the report and the patch