diff --git a/sources/AppBundle/Indexation/Meetups/MeetupScraper.php b/sources/AppBundle/Indexation/Meetups/MeetupScraper.php index 8127f4a40..4f6ef1324 100644 --- a/sources/AppBundle/Indexation/Meetups/MeetupScraper.php +++ b/sources/AppBundle/Indexation/Meetups/MeetupScraper.php @@ -37,6 +37,10 @@ public function getEvents() $events = $xpath->query("//*[contains(@id, 'event-card')]"); foreach ($events as $event) { try { + if (!$event instanceof \DOMElement) { + throw new \Exception('Élement DOM de type invalide'); + } + $eventUrl = $event->getAttribute('href'); if (preg_match('/\/(\d+)\/$/', $eventUrl, $matches)) { $id = (int) $matches[1];