mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Fix an issue with Phrequent where range_start might not be defined
Summary: If two events start on the same second (somewhat common now, since start time can be specified) we'll hit a "push" with no range start. Instead, always set a minimal range start.
This commit is contained in:
parent
b20142c0fe
commit
7f2b6412a2
1 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,11 @@ final class PhrequentTimeBlock extends Phobject {
|
|||
public function getObjectTimeRanges($now) {
|
||||
$ranges = array();
|
||||
|
||||
$range_start = time();
|
||||
foreach ($this->events as $event) {
|
||||
$range_start = min($range_start, $event->getDateStarted());
|
||||
}
|
||||
|
||||
$object_ranges = array();
|
||||
foreach ($this->events as $event) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue