Rapsys Git
/
airbundle
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba086d5
)
Force cast of simple xml element to string
author
Raphaël Gertz
<git@rapsys.eu>
Thu, 7 Mar 2024 21:40:57 +0000
(22:40 +0100)
committer
Raphaël Gertz
<git@rapsys.eu>
Thu, 7 Mar 2024 21:40:57 +0000
(22:40 +0100)
Command/WeatherCommand.php
patch
|
blob
|
history
diff --git
a/Command/WeatherCommand.php
b/Command/WeatherCommand.php
index c6fe6fcad4c9bd0761bc16d1f9fe21a66b8c1e34..b499390e0912b2f135a08acdf07530b1bb75f588 100644
(file)
--- 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]);