From c9f45a82ffd3eeb64bcadce268dc4aa463fd832a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 19 Nov 2014 12:30:51 +0000 Subject: [PATCH] fix formatting for timestamp and quiten error_log --- phpgwapi/inc/class.egw_customfields.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.egw_customfields.inc.php b/phpgwapi/inc/class.egw_customfields.inc.php index ad401f5ec5..6d59ab78e8 100755 --- a/phpgwapi/inc/class.egw_customfields.inc.php +++ b/phpgwapi/inc/class.egw_customfields.inc.php @@ -217,10 +217,10 @@ class egw_customfields implements IteratorAggregate { $format = $field['len'] ? $field['len'] : ($field['type'] == 'date' ? 'Y-m-d' : 'Y-m-d H:i:s'); $formats = preg_split('/[\\/. :-]/',$format); - $values = preg_split('/[\\/. :-]/',$value); + $values = preg_split('/[\\/. :-]/', is_numeric($value) ? egw_time::to($value, $format) : $value); if (count($formats) != count($values)) { - error_log(__METHOD__."(".array2string($field).", value='$value') format='$format', formats=".array2string($formats).", values=".array2string($values)); + //error_log(__METHOD__."(".array2string($field).", value='$value') format='$format', formats=".array2string($formats).", values=".array2string($values)); $values = array_slice($values, 0, count($formats)); } $date = array_combine($formats, $values);