• Resolved Drivingralle

    (@drivingralle)


    Hey!

    Today I tested MailPoet on a client server with PHP 8.1.9.
    From the cron I get the following PHP notice:

    PHP Deprecated:  Implicit conversion from float 19.972063064575195 to int loses precision in /wp-content/plugins/mailpoet/lib/Cron/DaemonHttpRunner.php on line 113

    The reason is simple. The call for pauseExecution in line 101 passes a float value to the method:

    #101: $this->pauseExecution($this->cronHelper->getDaemonExecutionLimit() - $elapsedTime);

    This leads to the function sleep() to make a notice.

    I could fix it by type casting the value inside the pauseExecution() method via (int) or intval().

    Greetings
    derRALF

Viewing 1 replies (of 1 total)
  • Hi there @drivingralle,

    Thanks for reaching out and I apologize for the late reply.

    Your report is 100% valid and I created a ticket for our developers to fix it, however, it doesn’t have an urgent priority since it’s only a notice and not an error.

    We appreciate you letting us know about it! Please don’t hesitate to contact us back if you need further assistance.

    Enjoy the rest of your day and stay safe!

Viewing 1 replies (of 1 total)
  • The topic ‘PHP deprication notice from DaemonHttpRunner::pauseExecution’ is closed to new replies.