From a6a1d553d9a5e17cd45f11f1e1c8d597e7184c77 Mon Sep 17 00:00:00 2001 From: Dag Date: Fri, 22 Sep 2023 20:59:45 +0200 Subject: [PATCH] tweaks (#3686) --- bridges/BundesbankBridge.php | 4 +++- bridges/ReutersBridge.php | 4 ++++ bridges/TwitchBridge.php | 8 +++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bridges/BundesbankBridge.php b/bridges/BundesbankBridge.php index 4335cb69..0c6b943f 100644 --- a/bridges/BundesbankBridge.php +++ b/bridges/BundesbankBridge.php @@ -71,7 +71,9 @@ class BundesbankBridge extends BridgeAbstract $item['content'] .= '' . $study->find('.teasable__subtitle', 0)->plaintext . ''; } - $item['content'] .= '

' . $study->find('.teasable__text', 0)->plaintext . '

'; + $teasable = $study->find('.teasable__text', 0); + $teasableText = $teasable->plaintext ?? ''; + $item['content'] .= '

' . $teasableText . '

'; $item['timestamp'] = strtotime($study->find('.teasable__date', 0)->plaintext); diff --git a/bridges/ReutersBridge.php b/bridges/ReutersBridge.php index 2acadfc3..fdf4e2a9 100644 --- a/bridges/ReutersBridge.php +++ b/bridges/ReutersBridge.php @@ -466,6 +466,10 @@ EOD; } $rows = $content['rows']; foreach ($rows as $row) { + if (!is_array($row)) { + // some rows are null + continue; + } $tr = ''; foreach ($row as $data) { $tr .= '' . $data . ''; diff --git a/bridges/TwitchBridge.php b/bridges/TwitchBridge.php index 4cc0375d..f408f885 100644 --- a/bridges/TwitchBridge.php +++ b/bridges/TwitchBridge.php @@ -157,9 +157,11 @@ EOD; // Add played games list to content $item['content'] .= '

Played games: