gpt4 book ai didi

php - Wordpress PHP警告: A non-numeric value encountered

转载 作者:行者123 更新时间:2023-12-03 08:39:41 25 4
gpt4 key购买 nike

我已经收到以下错误一段时间了:

PHP Warning:  A non-numeric value encountered in /home/user/public_html/wp-content/themes/mytheme/content-one.php on line 29
PHP Warning: A non-numeric value encountered in /home/user/public_html/wp-content/themes/mytheme/content-one.php on line 30
这些行是:
$minutes = floor($duration_in_seconds / 60);
$seconds = $duration_in_seconds % 60;
PHP版本:7.3.20
谁能帮助我一些建议,如何解决此问题?谢谢!

最佳答案

$duration_in_seconds可能是字符串,一种简单的解决方法是执行以下操作:

$duration_in_seconds = intval($duration_in_seconds, 10)

关于php - Wordpress PHP警告: A non-numeric value encountered,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62944456/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com