aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-12 02:06:29 -0700
committerfriendica <info@friendica.com>2012-06-12 02:06:29 -0700
commitb6ff71acaab74169aeef575cd20cb7cba0756c42 (patch)
treeb9d6e81d9daf0e8705a8650703b32a92dcaa1d4f
parent8eb81a99c6b032436ae397a65a7ca52c576965be (diff)
downloadvolse-hubzilla-b6ff71acaab74169aeef575cd20cb7cba0756c42.tar.gz
volse-hubzilla-b6ff71acaab74169aeef575cd20cb7cba0756c42.tar.bz2
volse-hubzilla-b6ff71acaab74169aeef575cd20cb7cba0756c42.zip
survive bad/un-parseable input to datetime_convert
-rw-r--r--include/datetime.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/datetime.php b/include/datetime.php
index 3b1491e4d..f6bf1041e 100644
--- a/include/datetime.php
+++ b/include/datetime.php
@@ -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