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 6dcc8dee872d3d83453fed1b6424392bd57a86ea..f64e9ff2ef70f7d7195b5f811205cd72512660d0 100644 (file)
@@ -2710,7 +2710,9 @@ class PHPFSPOT {
     */
    private function ts2str($timestamp)
    {
     */
    private function ts2str($timestamp)
    {
-      return strftime("%Y-%m-%d", $timestamp);
+      if(!empty($timestamp) && is_numeric($timestamp))
+         return strftime("%Y-%m-%d", $timestamp);
+
    } // ts2str()
 
    /**
    } // ts2str()
 
    /**