Remove empty events from Agenda::getNextOfEach
This commit is contained in:
parent
d9ff461877
commit
305b4e7064
|
@ -70,11 +70,11 @@ class Agenda {
|
|||
}
|
||||
|
||||
public function getNextOfEach(DateTimeImmutable $startDate) {
|
||||
$result = array_map(
|
||||
$result = array_filter(array_map(
|
||||
function($a) use ($startDate){
|
||||
return $a->getNextEventFrom($startDate);
|
||||
}, $this->activities
|
||||
);
|
||||
), function($a){return $a;});
|
||||
usort($result, function($a, $b) {
|
||||
return ($a->getStart()->getTimeStamp() < $b->getStart()->getTimeStamp())
|
||||
? -1
|
||||
|
|
Loading…
Reference in New Issue