fix error when interval is hours only

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

View File

@ -13,3 +13,8 @@ Version 1.5.2
- allow to filters users shown by `UserPickerType` based on flags. This flags do an additional filter based on the flags assigned in permissions groups;
- add a method to filters users by permissions groups flags in `UserRepository`
Master branch
=============
- fix error when interval is hour only

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';