diff options
author | mistic100 <mistic@piwigo.org> | 2014-01-22 10:45:24 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2014-01-22 10:45:24 +0000 |
commit | 732e0bb497b95ecbdc68bd15396c271cd86bdcc4 (patch) | |
tree | 6b61eb166c06ec5af21904bbf2bebcf727f628f2 /include | |
parent | eecb7cf42c71082e3f93cecaf1ebff2a673f72a6 (diff) |
bug 3027: Fatal error on Configuration->Options->Photo size
git-svn-id: http://piwigo.org/svn/trunk@26902 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.inc.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index 219f6dcce..1e2b1486f 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -550,12 +550,10 @@ function str2DateTime($original, $format=null) } else { - $date = new DateTime(); - $t = trim($original, '0123456789'); if (empty($t)) // from timestamp { - $date->setTimestamp($original); + $date = new DateTime('@'.$original); } else // from unknown date format (assuming something like Y-m-d H:i:s) { @@ -572,6 +570,7 @@ function str2DateTime($original, $format=null) if (!isset($ymdhms[4])) $ymdhms[4] = 0; if (!isset($ymdhms[5])) $ymdhms[5] = 0; + $date = new DateTime(); $date->setDate($ymdhms[0], $ymdhms[1], $ymdhms[2]); $date->setTime($ymdhms[3], $ymdhms[4], $ymdhms[5]); } |