fix error when interval is hours only

This commit is contained in:
2018-09-19 16:34:12 +02:00
parent 51d4c3bda0
commit dba4ea1c36
2 changed files with 7 additions and 2 deletions

View File

@@ -92,8 +92,8 @@ class NativeDateIntervalType extends DateIntervalType
return $current.$unit;
} elseif (\preg_match('/([0-9]{2}\:[0-9]{2}:[0-9]{2})/', $v) === 1) {
$tExploded = explode(':', $v);
} elseif (\preg_match('/([0-9]{2}\:[0-9]{2}:[0-9]{2})/', $current) === 1) {
$tExploded = explode(':', $current);
$intervalSpec = 'T';
$intervalSpec.= $tExploded[0].'H';
$intervalSpec.= $tExploded[1].'M';