Hi,
I just installed the hotel booking module for Ubercart and now I cannot add a base rate for a room: when I click on "add a base rate" it causes a blank page. I noticed that I have a blank page everytime I try to run a cron as well (cron restarts working correctly if I disable the hotel booking module). I've got PHP 5.1.6 running. Here is the php error:

When I run cron-
PHP Fatal error: Call to undefined method stdClass::format() in /var/www/vhosts/verdeazzurro.eu/httpdocs/tenuta/modules/uc_hotel/hotel_booking/hotel_booking.module on line 417, referer: http://www.verdeazzurro.eu/tenuta/admin/build/modules

When I click on "add a base rate"
PHP Fatal error: Call to undefined method stdClass::format() in /var/www/vhosts/verdeazzurro.eu/httpdocs/tenuta/modules/uc_hotel/hotel_booking/hotel_booking.admin.inc on line 899, referer: http://www.verdeazzurro.eu/tenuta/admin/store/hotel_booking

Any help?

Thanks

Comments

larowlan’s picture

Status: Active » Closed (won't fix)

Hi
Please see http://www.php.net/manual/en/datetime.installation.php
the Date/Time classes are not available in php 5.1.x

I need to update the front page to state php 5.2 is required.

If you're on shared hosting or similar and can't update to php 5.2, you can use the php 4 emulation features of the date module (a dependency).

To do this requires changing all instances of $some_var->format('format string') into date_format_date($some_var, 'format_string');

If you do go down this path, please post a patch here for others to use.

Lee

gpiva’s picture

I upgraded the PHP version, now it works!

Thanks Lee