1
0
Fork 0

survive bad/un-parseable input to datetime_convert

This commit is contained in:
friendica 2012-06-12 02:06:29 -07:00
parent 8eb81a99c6
commit b6ff71acaa

View file

@ -87,7 +87,7 @@ function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d
$from = 'UTC';
if($to === '')
$to = 'UTC';
if($s === '')
if($s === '' || (! is_string($s)))
$s = 'now';
// Slight hackish adjustment so that 'zero' datetime actually returns what is intended