this if condition throw "A non well formed numeric value encountered" message.
if(strtotime($from) + $conHour*60*60 == strtotime($to)){
}
The error I see is:
A non well formed numeric value encountered
****var_dump**
$from = string(19) "2019-04-15 16:05:00"
$to =string(19)"2019-04-15 17:05:00"
$conhour = string(5) "01:00"
This notice is thrown when you are trying to perform a math operation on a numeric value and a non-numeric type (string, bool, object etc.).
The reason that this may be happening in your code could be that either $from
or $to
are not valid date strings: see https://www.php.net/manual/en/datetime.formats.date.php and https://www.php.net/manual/en/datetime.formats.time.php for correct formatting.
Another possible reason is that your $conHour
does not have a valid numeric value.
EDIT: based on your update it is the latter: $conhour = string(5) "01:00" you are trying to multiply a string. First (depending on how you get that variable) convert it in to a numeric value (1
) and then you will be able to multiply it