我已经收到以下错误一段时间了:
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/