plugins/libkolab

Aleksander Machniak machniak at kolabsys.com
Sat Nov 22 18:11:22 CET 2014


 plugins/libkolab/lib/kolab_format.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fb4f815e532aebed80bfba806621e61322faaf4c
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Sat Nov 22 12:10:06 2014 -0500

    Fix bug where DateTime($date, null) throws an exception (#3965)

diff --git a/plugins/libkolab/lib/kolab_format.php b/plugins/libkolab/lib/kolab_format.php
index 8c6b1d4..625483b 100644
--- a/plugins/libkolab/lib/kolab_format.php
+++ b/plugins/libkolab/lib/kolab_format.php
@@ -223,7 +223,7 @@ abstract class kolab_format
                 if ($tz) $datetime->setTimezone($tz);
             }
             else if (is_string($datetime) && strlen($datetime)) {
-                $datetime = new DateTime($datetime, $tz ?: null);
+                $datetime = $tz ? new DateTime($datetime, $tz) : new DateTime($datetime);
             }
         }
         catch (Exception $e) {}




More information about the commits mailing list