From 48b601a1a00dc70143e2b07c44d55597a426236e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 7 Mar 2024 22:40:57 +0100 Subject: [PATCH] Force cast of simple xml element to string --- Command/WeatherCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Command/WeatherCommand.php b/Command/WeatherCommand.php index c6fe6fc..b499390 100644 --- a/Command/WeatherCommand.php +++ b/Command/WeatherCommand.php @@ -265,7 +265,7 @@ class WeatherCommand extends DoctrineCommand { //Iterate on each link containing data foreach($sx->xpath('//a[contains(@class,"daily-forecast-card")]') as $node) { //Get date - $dsm = trim($node->div[0]->h2[0]->span[1]); + $dsm = trim((string)$node->div[0]->h2[0]->span[1]); //Get temperature $temperature = str_replace('°', '', (string)$node->div[0]->div[0]->span[0]); -- 2.41.1