diff --git a/sources/Afup/Association/Cotisations.php b/sources/Afup/Association/Cotisations.php index 921b963ee..c549177ff 100644 --- a/sources/Afup/Association/Cotisations.php +++ b/sources/Afup/Association/Cotisations.php @@ -268,7 +268,7 @@ public function validerReglementEnLigne($cmd, $total, string $autorisation, stri $date_fin_precedente = $cotisation === false ? 0 : $cotisation['date_fin']; if ($date_fin_precedente > 0) { - $date_debut = strtotime('+1day', $date_fin_precedente); + $date_debut = strtotime('+1day', (int) $date_fin_precedente); } $date_fin = $this->finProchaineCotisation($cotisation)->format('U'); diff --git a/sources/Afup/Corporate/Article.php b/sources/Afup/Corporate/Article.php index f5184b112..b293163e5 100644 --- a/sources/Afup/Corporate/Article.php +++ b/sources/Afup/Corporate/Article.php @@ -182,7 +182,10 @@ public function charger(): void $requete = 'SELECT * FROM afup_site_article WHERE id = ' . $this->bdd->echapper($this->id); - $this->remplir($this->bdd->obtenirEnregistrement($requete)); + $data = $this->bdd->obtenirEnregistrement($requete); + if ($data) { + $this->remplir($data); + } } public function chargerDepuisRaccourci($raccourci): void @@ -190,7 +193,10 @@ public function chargerDepuisRaccourci($raccourci): void $requete = 'SELECT * FROM afup_site_article WHERE CONCAT(id, "-", raccourci) = ' . $this->bdd->echapper($raccourci); - $this->remplir($this->bdd->obtenirEnregistrement($requete)); + $data = $this->bdd->obtenirEnregistrement($requete); + if ($data) { + $this->remplir($data); + } } public function charger_dernier_depuis_rubrique(): void @@ -199,7 +205,10 @@ public function charger_dernier_depuis_rubrique(): void FROM afup_site_article WHERE id_site_rubrique = ' . $this->bdd->echapper($this->id_site_rubrique) . ' ORDER BY date DESC LIMIT 1'; - $this->remplir($this->bdd->obtenirEnregistrement($requete)); + $data = $this->bdd->obtenirEnregistrement($requete); + if ($data) { + $this->remplir($data); + } } public function remplir(array $article): void diff --git a/sources/PlanetePHP/FeedCrawler.php b/sources/PlanetePHP/FeedCrawler.php index 427f97936..389107f83 100644 --- a/sources/PlanetePHP/FeedCrawler.php +++ b/sources/PlanetePHP/FeedCrawler.php @@ -32,6 +32,10 @@ public function crawl(): void foreach ($feeds as $feed) { echo $feed->getFeed() . ' : début...
', PHP_EOL; $rss = fetch_rss($feed->getFeed()); + if (!$rss->items) { + echo $feed->getFeed(), ' : vide fin !

', PHP_EOL, PHP_EOL; + continue; + } $rss->items = array_reverse($rss->items); foreach ($rss->items as $item) { if (empty($item['id'])) {