• Resolved damiendoherty

    (@damiendoherty)


    Hi there. We’re using the calendar to show availability for holiday bookings. Generally working pretty well but seeing some errors on a couple of pages.

    Here’s the error:

    [Fri Jul 10 15:41:38.900246 2020] [proxy_fcgi:error] [pid 19870] [client 94.174.136.238:59589] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function current_time(), 0 passed in /home/kiphideaways/public_html/wp-content/plugins/ics-calendar/class-r34ics.php on line 809 and at least 1 expected in /home/kiphideaways/public_html/wp-includes/functions.php:71\nStack trace:\n#0 /home/kiphideaways/public_html/wp-content/plugins/ics-calendar/class-r34ics.php(809): current_time()\n#1 /home/kiphideaways/public_html/wp-content/plugins/ics-calendar/templates/calendar-month.php(112): R34ICS->first_dow()\n#2 /home/kiphideaways/public_html/wp-content/plugins/ics-calendar/class-r34ics.php(628): include('/home/kiphideaw...')\n#3 /home/kiphideaways/public_html/wp-content/plugins/ics-calendar/class-r34ics.php(906): R34ICS->display_calendar()\n#4 /home/kiphideaways/public_html/wp-includes/shortcodes.php(343): R34ICS->shortcode()\n#5 [internal function]: do_shortcode_tag()\n#6 /home/kiphideaways/public_html/wp-includes/shortcodes.php(218): preg_replace_callback()\n#7 /home/kiphideaways...', referer: https://www.kiphideaways.com/wp-admin/post.php?post=5908&action=edit

    Possibly being caused by the fact that you’ve left a required parapeter out of the WP current_time helper.

    Not sure why this would only happen on certaon pages though.

    Any clues please as this is now causing fatal php errors.

    Many thanks

    Damien

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author room34

    (@room34)

    Ah, you’re right! It’s funny that this hasn’t been caught before, but that line of code only gets executed if the input parameter for the function it’s inside (first_dow()) is null, which it should never be under normal circumstances; the only places where this function is called are always passing in a value that was assigned earlier in the template.

    I suspect this is an issue that has multiple layers, but ultimately there is something unusual about the calendar feed you’re passing in that is causing a set of conditions I’ve never seen nor had anyone else report to me before.

    Nonetheless… I do need to add that missing parameter to the function. I’ll do that and roll out an update today. But once you’ve got that update, I think you might find additional/different errors start displaying instead. If so, follow up here and I’ll investigate those as well.

    Thanks!

    Thread Starter damiendoherty

    (@damiendoherty)

    Ok great. Thanks very much for the speedy response.
    I’ve noticed that it seems to struggle on ical feeds that have long bookings – eg if a booking runs consecutively for over a month. This seems to happen if there are multiple bookings within a month that means every day is booked up. The ical just returns this as one long booking. And for some reason the ical plugin doesn’t seem to like / recognise these longer ones.
    This may be unrelated though.

    Many thanks

    Damien

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error’ is closed to new replies.