Fatal error: Cannot redeclare date_format()

Help
JVB
2008-10-14
2013-05-23
  • JVB

    JVB - 2008-10-14

    My IT Department updated our web servers over the weekend and now I get the following:

    Fatal error: Cannot redeclare date_format() in /data/web/intranet/onramp/pub/dist01/cal/rooms/includes/functions/calendar_fns.php on line 448

    Any Ideas?

     
    • JVB

      JVB - 2008-10-15

      With PHP 5.0 and later, there appears to be an intrinsic date_format() function that calendar_fns.php attempts to redefine.  Can I comment out this function? Does anything use the function "date_format()" from lines 444 to 448 of calendar_fns_.php?

       
    • VIP member

      VIP member - 2008-10-15

      I'm using phpBookingCalendar_10d.zip (latest?, updated may 19 2008). There's no such function as date_format(). Instead, a function named rev_date_format()

      function rev_date_format($date)
      {
        list($year, $month, $day) = explode("-",$date);
        return month_name($month) . ' ' . sprintf("%d",$day) . ', ' . $year;
      }

      Looks like it's not used anywhere, so maybe you can comment out date_format() in your version, too.

       
    • JVB

      JVB - 2008-10-15

      So far, commenting out lines 444 to 448 is a success!  Next I'll have to update to phpBookingCalendar_10d.zip  Out of curiosity, why is an unused function load with the includes?

       

Log in to post a comment.