diff --git a/inc/sc_agenda.php b/inc/sc_agenda.php
index e64b68ee26943f9ef2c809727d30ee958842012e..8c2514008780d8c71f590f1437c432eb0ebf67f8 100644
--- a/inc/sc_agenda.php
+++ b/inc/sc_agenda.php
@@ -1781,7 +1781,7 @@ function quete_calendrier_interval_rv($avant, $apres) {
 		}
 
 			$j++;
-			$ladate = date('Y-m-d', mktime(1, 1, 1, $mois_avant, ($j + $jour_avant), $annee_avant));
+			$ladate = date('Y-m-d', mktime(1, 1, 1, intval($mois_avant), ($j + intval($jour_avant)), intval($annee_avant)));
 
 			$amj = date_anneemoisjour($ladate);
 		}
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index 2b7c2fddfb0b852b3c013fd4c23ff15f0d565b54..603cc2785ae449d96bfd73434c3b7ea19980fc68 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -7,6 +7,6 @@ parameters:
 	excludePaths:
 		analyseAndScan:
 			- lang
-	level: 4
+	level: 5
 	bootstrapFiles:
 		- phpstan-constants.php
diff --git a/soyezcreateurs_fonctions.php b/soyezcreateurs_fonctions.php
index fbec90b642f313fddb0ad56c30918ced4894e800..eca657e17ab4404dfe81e231117d959f74b659e6 100644
--- a/soyezcreateurs_fonctions.php
+++ b/soyezcreateurs_fonctions.php
@@ -227,7 +227,7 @@ function sc_decoder_date($date_d, $date_e, $horaire = 'oui', $mode = false, $cou
 	$debut['minutes'] = substr($date_d, 11, 2);
 	$debut['secondes'] = substr($date_d, 13, 2);
 	$debut['mois_fr'] = sc_get_mois($debut['mois']);
-	$debut['jour_fr'] = (sc_get_jour(mktime($debut['heure'], $debut['minutes'], $debut['secondes'], $debut['mois'], $debut['jour'], $debut['annee'])));
+	$debut['jour_fr'] = (sc_get_jour(mktime(intval($debut['heure']), intval($debut['minutes']), intval($debut['secondes']), intval($debut['mois']), intval($debut['jour']), intval($debut['annee']))));
 	$fin = [];
 	$fin['annee'] = substr($date_e, 0, 4);
 	$fin['mois'] = substr($date_e, 4, 2);
@@ -236,7 +236,7 @@ function sc_decoder_date($date_d, $date_e, $horaire = 'oui', $mode = false, $cou
 	$fin['minutes'] = substr($date_e, 11, 2);
 	$fin['secondes'] = substr($date_e, 13, 2);
 	$fin['mois_fr'] = sc_get_mois($fin['mois']);
-	$fin['jour_fr'] = sc_get_jour(mktime($fin['heure'], $fin['minutes'], $fin['secondes'], $fin['mois'], $fin['jour'], $fin['annee']));
+	$fin['jour_fr'] = sc_get_jour(mktime(intval($fin['heure']), intval($fin['minutes']), intval($fin['secondes']), intval($fin['mois']), intval($fin['jour']), intval($fin['annee'])));
 	$get_same = sc_same_day($debut, $fin);
 	if ($get_same) {
 		if ($court == 'oui') {
@@ -494,8 +494,8 @@ function sc_generer_ligne_agenda($jour, $amj, $evts, $type, $agenda) {
 }
 function http_calendrier_sc_grand($annee, $mois, $jour, $echelle, $partie_cal, $script, $ancre, $evt) {
 	$nom = null;
- $jour_semaine = null;
- [$sansduree, $evenements, $premier_jour, $dernier_jour] = $evt;
+	$jour_semaine = null;
+	[$sansduree, $evenements, $premier_jour, $dernier_jour] = $evt;
 
 	if ($sansduree) {
 		foreach ($sansduree as $d => $r) {
@@ -519,7 +519,7 @@ function http_calendrier_sc_grand($annee, $mois, $jour, $echelle, $partie_cal, $
 		$mois_t_precedent = mktime(1, 1, 1, $mois - 1, 1, $annee);
 		$jour_mois_precedent = date('t', $mois_t_precedent) + 2 - $i;
 		$mois_precedent = date('m', $mois_t_precedent);
-		$annee_en_cours = date('Y', $nom);
+		$annee_en_cours = date('Y');
 		$amj = date('Y', $mois_t_precedent) . $mois_precedent . $jour_mois_precedent;
 		$evts = $evenements[$amj];
 		$aff = sc_generer_ligne_agenda($jour_mois_precedent, $amj, $evts, 'agendanotthismonth', 'grand');
@@ -663,9 +663,9 @@ function sc_agenda_memo_full($date_deb = 0, $date_fin = 0, $titre = '', $descrip
 			0,
 			0,
 			0,
-			date('m', $ts_startday1),
-			date('d', $ts_startday1),
-			date('Y', $ts_startday1)
+			intval(date('m', $ts_startday1)),
+			intval(date('d', $ts_startday1)),
+			intval(date('Y', $ts_startday1))
 		); // et remise a zero de l'heure
 	}
 	// toujours retourner vide pour qu'il ne se passe rien