Skip to content

Commit

Permalink
sinceYear should never be string
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed May 9, 2022
1 parent 8ee7065 commit 44df76f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/LitCalAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,7 @@ private function applyDiocesanCalendar() {
}
//if sinceYear is undefined or null or empty, let's go ahead and create the event in any case
//creation will be restricted only if explicitly defined by the sinceYear property
if( $this->LitSettings->Year >= $obj->sinceYear || $obj->sinceYear === null || $obj->sinceYear == '' ) {
if( $this->LitSettings->Year >= $obj->sinceYear || $obj->sinceYear === null || $obj->sinceYear === 0 ) {
$currentFeastDate = DateTime::createFromFormat( '!j-n-Y', $obj->day . '-' . $obj->month . '-' . $this->LitSettings->Year, new DateTimeZone( 'UTC' ) );
if( $obj->grade > LitGrade::FEAST ) {
if( $this->Cal->inSolemnities( $currentFeastDate ) && $key != $this->Cal->solemnityKeyFromDate( $currentFeastDate ) ) {
Expand Down

0 comments on commit 44df76f

Please sign in to comment.