From 4e0a5979552a79382f74edb052f4578333d2a007 Mon Sep 17 00:00:00 2001 From: John D'Orazio Date: Sun, 1 May 2022 14:50:34 +0200 Subject: [PATCH] fix issue #110 undefined variable $lang --- includes/LitCalAPI.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/LitCalAPI.php b/includes/LitCalAPI.php index 4fa3f737..66e4509e 100644 --- a/includes/LitCalAPI.php +++ b/includes/LitCalAPI.php @@ -1413,10 +1413,10 @@ private function createImmaculateHeart() { */ private function handleSaintJaneFrancesDeChantal() { $StJaneFrancesNewDate = DateTime::createFromFormat( '!j-n-Y', '12-8-' . $this->LitSettings->Year, new DateTimeZone( 'UTC' ) ); + $langs = ["LA" => "lt", "ES" => "es"]; + $lang = in_array( $this->LitSettings->Locale, array_keys($langs) ) ? $langs[$this->LitSettings->Locale] : "lt"; if ( self::DateIsNotSunday( $StJaneFrancesNewDate ) && $this->Cal->notInSolemnitiesFeastsOrMemorials( $StJaneFrancesNewDate ) ) { $festivity = $this->Cal->getFestivity( "StJaneFrancesDeChantal" ); - $langs = ["LA" => "lt", "ES" => "es"]; - $lang = in_array( $this->LitSettings->Locale, array_keys($langs) ) ? $langs[$this->LitSettings->Locale] : "lt"; if( $festivity !== null ) { $this->Cal->moveFestivityDate( "StJaneFrancesDeChantal", $StJaneFrancesNewDate ); $this->Messages[] = sprintf(