Fixed ZipWriter getDosDatetime on NaN value
authorThomas Schlage <thomas@globalleadsgroup.com>
Fri, 31 May 2013 12:54:22 +0000 (14:54 +0200)
committerThomas Schlage <thomas@globalleadsgroup.com>
Fri, 31 May 2013 12:54:22 +0000 (14:54 +0200)
wcfsetup/install/files/lib/system/io/ZipWriter.class.php

index 18a520a807039b390cf1837e5948b296c0ab4f79..0835e79781d5afeac5a4390d4ce701d0067a9b28 100644 (file)
@@ -174,14 +174,17 @@ class ZipWriter {
                        pack("V", strlen($headers)).
                        "\x00\x00";
        }
-       
+
        /**
         * Converts an unix timestamp to Zip file time.
-        * 
+        *
         * @param       integer         $date           unix timestamp
         * @return      string
         */
-       protected static function getDosDatetime($date = 0) {
+       protected static function getDosDatetime($date) {
+               // Ensure we have a numeric value
+               $date = intval($date);
+
                $day = gmdate('d', $date);
                $month = gmdate('m', $date);
                $year = gmdate('Y', $date);