Support » Plugin: The Events Calendar » date() expects parameter 2 to be int

  • Resolved donbowman

    (@donbowman)


    PHP message: PHP Warning: date() expects parameter 2 to be int, string given in /app/wp-content/plugins/the-events-calendar/src/functions/template-tags/date.php on line 38

    error is thrown when i save an event. the event then shows as blank when viewing as /events/X (or when preview).

    I have enabled gutenberg blocks editor.
    I am using neve (pro) theme.
    The server has TZ=UTC
    I am running wordpress 5.6.1
    the-events-calendar is 5.3.2.1

    in the event I have set the timezone to Toronto.

    [agilicus-www-nbr6cpjykgz-66f768fddf-bbvw6] 2021/02/08 01:06:45 [error] 99#99: *51 FastCGI sent in stderr: "PHP message: PHP Warning:  date() expects parameter 2 to be int, string given in /app/wp-content/plugins/the-events-calendar/src/functions/template-tags/date.php on line 38
    PHP message: PHP Stack trace:PHP message: PHP   1. {main}() /app/index.php:0
    PHP message: PHP   2. require() /app/index.php:17
    PHP message: PHP   3. wp() /app/wp-blog-header.php:16
    PHP message: PHP   4. WP->main() /app/wp-includes/functions.php:1291
    PHP message: PHP   5. WP->parse_request() /app/wp-includes/class-wp.php:745
    PHP message: PHP   6. do_action_ref_array() /app/wp-includes/class-wp.php:388
    PHP message: PHP   7. WP_Hook->do_action() /app/wp-includes/plugin.php:551
    PHP message: PHP   8. WP_Hook->apply_filters() /app/wp-includes/class-wp-hook.php:311
    PHP message: PHP   9. rest_api_loaded() /app/wp-includes/class-wp-hook.php:287
    PHP message: PHP  10. WP_REST_Server->serve_request() /app/wp-includes/rest-api.php:354
    PHP message: PHP  11. WP_REST_Server->dispatch() /app/wp-includes/rest-api/class-wp-rest-server.php:440
    PHP message: PHP  12. WP_REST_Server->respond_to_request() /app/wp-includes/rest-api/class-wp-rest-server.php:1007
    PHP message: PHP  13. WP_REST_Posts_Controller->update_item() /app/wp-includes/rest-api/class-wp-rest-server.php:1160
    PHP message: PHP  14. wp_update_post() /app/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:764
    PHP message: PHP  15. wp_insert_post() /app/wp-includes/post.php:4411
    PHP message: PHP  16. do_action() /app/wp-includes/post.php:4320
    PHP message: PHP  17. WP_Hook->do_action() /app/wp-includes/plugin.php:484
    PHP message: PHP  18. WP_Hook->apply_filters() /app/wp-includes/class-wp-hook.php:311
    PHP message: PHP  19. YoastWPSEOIntegrationsWatchersIndexable_Post_Watcher->build_indexable() /app/wp-includes/class-wp-hook.php:289
    PHP message: PHP  20. YoastWPSEOBuildersIndexable_Link_Builder->build() /app/wp-content/plugins/wordpress-seo-premium/src/integrations/watchers/indexable-post-watcher.php:224
    PHP message: PHP  21. apply_filters() /app/wp-content/plugins/wordpress-seo-premium/src/builders/indexable-link-builder.php:87
    PHP message: PHP  22. WP_Hook->apply_filters() /app/wp-includes/plugin.php:212
    PHP message: PHP  23. do_blocks() /app/wp-includes/class-wp-hook.php:287
    PHP message: PHP  24. render_block() /app/wp-includes/blocks.php:760
    PHP message: PHP  25. WP_Block->render() /app/wp-includes/blocks.php:722
    PHP message: PHP  26. Tribe__Events__Editor__Blocks__Classic_Event_Details->render() /app/wp-includes/class-wp-block.php:221
    PHP message: PHP  27. Tribe__Events__Editor__Template->template() /app/wp-content/plugins/the-events-calendar/src/Tribe/Editor/Blocks/Classic_Event_Details.php:31
    PHP message: PHP  28. Tribe__Events__Editor__Template->template_safe_include() /app/wp-content/plugins/the-events-calendar/common/src/Tribe/Template.php:953
    PHP message: PHP  29. include() /app/wp-content/plugins/the-events-calendar/common/src/Tribe/Template.php:1215
    PHP message: PHP  30. tribe_get_display_end_date() /app/wp-content/plugins/the-events-calendar/src/views/blocks/classic-event-details.php:27
    PHP message: PHP  31. date() /app/wp-content/plugins/the-events-calendar/src/functions/template-tags/date.php:38
    PHP message: PHP Warning:  date() expects parameter 2 to be int, string given in /app/wp-content/plugins/the-events-calendar/src/functions/template-tags/date.php on line 38
    PHP message: PHP Stack trace:PHP message: PHP   1. {main}() /app/index.php:0
    PHP message: PHP   2. require() /app/index.php:17
    PHP message: PHP   3. wp() /app/wp-blog-header.php:16
    PHP message: PHP   4. WP->main() /app/wp-includes/functions.php:1291
    PHP message: PHP   5. WP->parse_request() /app/wp-includes/class-wp.php:745
    PHP message: PHP   6. do_action_ref_array() /app/wp-includes/class-wp.php:388
    PHP message: PHP   7. WP_Hook->do_action() /app/wp-includes/plugin.php:551
    PHP message: PHP   8. WP_Hook->apply_filters() /app/wp-includes/class-wp-hook.php:311
    PHP message: PHP   9. rest_api_loaded() /app/wp-includes/class-wp-hook.php:287
    PHP message: PHP  10. WP_REST_Server->serve_request()
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Gustavo Bordoni

    (@bordoni)

    Hi @donbowman,

    It seems like this problem might be related to something around Yoast SEO Premium plugin.

    But for sure it’s something we can improve on our codebase to avoid having these warnings show up.

    Which version of PHP are you using?

    Best Regards,

    Thread Starter donbowman

    (@donbowman)

    Thanks!
    its 7.4.3-4ubuntu2.4 on ubuntu 20.04.1

    Plugin Author Gustavo Bordoni

    (@bordoni)

    Hi @donbowman,

    Do you mind deactivating Yoast SEO to test if this is actually the problem?

    If so I will log an internal ticket to solve the problem from our side.

    Best Regards,

    Plugin Support Marho

    (@matumu)

    Hey there!

    This thread has been pretty quiet for a while, so we’re going to go ahead and mark it as resolved.

    If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!

    Marho

    Plugin Support James Welbes

    (@highprrrr)

    @donbowman

    Hi there!

    I just wanted to pop in and say, we are no longer able to reproduce this error.

    Can you make sure your plugins are all up to date, and let us know if you’re still seeing this issue?

    Thanks!

    -James

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.