Skip to content

Commit

Permalink
unset Advent1 outside of foreach cycle!
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Mar 25, 2024
1 parent 3401c41 commit a9b0238
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions includes/FestivityCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,16 +594,14 @@ public function purgeDataAdventChristmas( int|null $buffer = null ) {
foreach( $this->festivities as $key => $festivity ) {
if( $festivity->date > $this->festivities[ "Advent1" ]->date ) {
unset( $this->festivities[ $key ] );
// make sure it isn't still contained in another collection
unset( $this->solemnities[ $key ] );
unset( $this->feasts[ $key ] );
unset( $this->memorials[ $key ] );
unset( $this->WeekdayAdventChristmasLent[ $key ] );
unset( $this->SolemnitiesLordBVM[ $key ] );
unset( $this->SundaysAdventLentEaster[ $key ] );
// make sure it isn't still contained in another collection
unset( $this->solemnities[ $key ] );
unset( $this->feasts[ $key ] );
unset( $this->memorials[ $key ] );
unset( $this->WeekdayAdventChristmasLent[ $key ] );
unset( $this->SolemnitiesLordBVM[ $key ] );
unset( $this->SundaysAdventLentEaster[ $key ] );
}
//lastly remove First Sunday of Advent
unset( $this->festivities[ "Advent1" ] );
/* Perhaps we shouldn't remove the Vigil Mass for the first Sunday of Advent?
// also remove the Vigil Mass for the first Sunday of Advent
if(
Expand All @@ -617,6 +615,8 @@ public function purgeDataAdventChristmas( int|null $buffer = null ) {
}
*/
}
//lastly remove First Sunday of Advent
unset( $this->festivities[ "Advent1" ] );
}

public function mergeFestivityCollection( FestivityCollection $festivities ) {
Expand Down

0 comments on commit a9b0238

Please sign in to comment.