Warning: A non-numeric value encountered in C:\XAMPP\htdocs\mysites\nametestclonescript\includes\core.php on line 95 -
i got error on code.
warning: non-numeric value encountered in c:\xampp\htdocs\mysites\namescript\includes\core.php on line 95
this code on error shown..
95. $test['time'] = time() - $test['time']; 96. if($limit != 3){ 97. $limit++; 98. }else{ 99. if($test['time'] > 86400){ 100. $is_new = false; 101. } 102. }
i using php 7.1. can me resolve error without removing line. starter in php. thank you
try cast $test['time']
int, return 0 if $test['time']
empty or non-numeric:
$test['time'] = time() - ((int)$test['time']);
Comments
Post a Comment