check if parameter of ts2str is really numeric
[phpfspot.git] / phpfspot.class.php
index 6dcc8dee872d3d83453fed1b6424392bd57a86ea..f64e9ff2ef70f7d7195b5f811205cd72512660d0 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()
 
    /**