• Resolved amorgaut

    (@amorgaut)


    When the sentinel plugin is enabled on my website I currently get the following errors

    Warning: mktime() expects parameter 6 to be int, string given in /..../wp-includes/class-wp-date-query.php on line 316
    
    Warning: mktime() expects parameter 6 to be int, string given in /..../wp-includes/class-wp-date-query.php on line 351
    
    Warning: mktime() expects parameter 6 to be int, string given in /..../wp-includes/class-wp-date-query.php on line 316
    
    Warning: mktime() expects parameter 6 to be int, string given in /..../wp-includes/class-wp-date-query.php on line 351

    I tried to solve it

    • by disabling/enabling different plugins
    • by updating different plugins and in the end by updating wordpress to 5.9

      The only thing that worked for now was to disable “La Sentinelle”.

      My current configuration is
      – La sentinelle antispam 2.1.0
      – WordPress 5.9
      – Woocommerce 6.1.1

    • This topic was modified 2 years, 10 months ago by amorgaut.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter amorgaut

    (@amorgaut)

    This breaks also the generated sitemaps ??

    Thread Starter amorgaut

    (@amorgaut)

    Looks like those websites are having the same issue than me:
    https://altoconseil.com/lectures/
    https://biosrenovable.com/author/bios/
    https://micronutrition-prevention.fr/

    And I’m sure there is plenty more

    I can not show it on mine right now as I had to disable to stop breaking the SEO

    Hello, I have the same error. And I know another site with the same problem.

    Hello!

    I’m biosrenovable.com admin. My solution was updgrading PHP version from 7.4 to 8.0.

    Hope it helps.

    Thread Starter amorgaut

    (@amorgaut)

    Thanks for you feedback about PHP 8.0

    Unfortunately PHP 8 is in beta support by wordpress
    https://make.www.ads-software.com/core/handbook/references/php-compatibility-and-wordpress-versions/
    But well, last remaining issues looks to be deprecation notice messages

    Woocommerce seems to be compatible
    https://github.com/woocommerce/woocommerce/issues/27674

    But not sure for the other plugins…
    I’m not very confortable to update it right now
    I’ll have to check them first

    • This reply was modified 2 years, 10 months ago by amorgaut.

    I’ve tried php 8.1 and the error is still there.

    Thread Starter amorgaut

    (@amorgaut)

    I’ve tried PHP 8.1 and it’s worse

    Fatal error: Uncaught TypeError: mktime(): Argument #6 ($year) must be of type ?int, string given in /.../wp-includes/class-wp-date-query.php:316 Stack trace: 
    #0 /.../wp-includes/class-wp-date-query.php(316): mktime(0, 0, 0, 12, 31, '%2021') 
    #1 /.../wp-includes/class-wp-date-query.php(294): WP_Date_Query->validate_date_values(Array) 
    #2 /.../wp-includes/class-wp-date-query.php(219): WP_Date_Query->validate_date_values(Array) 
    #3 /.../wp-includes/class-wp-date-query.php(228): WP_Date_Query->sanitize_query(Array, Array) 
    #4 /.../wp-includes/class-wp-date-query.php(173): WP_Date_Query->sanitize_query(Array) 
    #5 /.../wp-includes/class-wp-comment-query.php(914): WP_Date_Query->__construct(Array, 'comment_date') 
    #6 /.../wp-includes/class-wp-comment-query.php(458): WP_Comment_Query->get_comment_ids() 
    #7 /.../wp-includes/class-wp-comment-query.php(367): WP_Comment_Query->get_comments() 
    #8 /.../wp-includes/comment.php(244): WP_Comment_Query->query(Array) 
    #9 /.../wp-content/plugins/la-sentinelle-antispam/functions/lasent-remove-spam.php(42): get_comments(Array) 
    #10 /.../wp-includes/class-wp-hook.php(307): la_sentinelle_remove_comments('') 
    #11 /.../wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) 
    #12 /.../wp-includes/plugin.php(474): WP_Hook->do_action(Array) 
    #13 /.../wp-includes/load.php(1100): do_action('shutdown') #14 [internal function]: shutdown_action_hook() 
    #15 {main} thrown in /.../wp-includes/class-wp-date-query.php on line 316

    Moreover
    – the errors are still only shown when “la sentinelle” is activated
    – La sentinelle is clearly visible in the stack trace this time

    #9 /.../wp-content/plugins/la-sentinelle-antispam/functions/lasent-remove-spam.php(42): get_comments(Array) 
    
    • This reply was modified 2 years, 9 months ago by amorgaut.
    • This reply was modified 2 years, 9 months ago by amorgaut.
    Plugin Author Marcel Pol

    (@mpol)

    Hi, terribly sorry about this.
    Version 2.1.1 is out that fixes this issue.

    Regards,
    Marcel

    Thread Starter amorgaut

    (@amorgaut)

    Tested with both PHP 7.4 & PHP 8.1

    It looks to work!

    Thank you so much!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP mktime error shown on the page’ is closed to new replies.