check if parameter of ts2str is really numeric
authorAndreas Unterkircher <unki@netshadow.at>
Mon, 12 May 2008 06:01:18 +0000 (08:01 +0200)
committerAndreas Unterkircher <unki@netshadow.at>
Mon, 12 May 2008 06:01:18 +0000 (08:01 +0200)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php

index 6dcc8de..f64e9ff 100644 (file)
@@ -2710,7 +2710,9 @@ class PHPFSPOT {
     */
    private function ts2str($timestamp)
    {
-      return strftime("%Y-%m-%d", $timestamp);
+      if(!empty($timestamp) && is_numeric($timestamp))
+         return strftime("%Y-%m-%d", $timestamp);
+
    } // ts2str()
 
    /**