From 44df76f230d2595c57a0abe44539efb543f0dc4f Mon Sep 17 00:00:00 2001 From: John D'Orazio Date: Mon, 9 May 2022 21:12:43 +0200 Subject: [PATCH] sinceYear should never be string --- includes/LitCalAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/LitCalAPI.php b/includes/LitCalAPI.php index 66e4509e..bbd9177b 100644 --- a/includes/LitCalAPI.php +++ b/includes/LitCalAPI.php @@ -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 ) ) {