pub / yt2html

Fetches Youtube content via RSS and provides a chronological timeline
git clone https://src.jayvii.de/pub/yt2html.git
Home | Log | Files | Exports | Refs | README | RSS

commit 5f9299b36fc453f8a26762730e3c97eca069ccdc
parent 8abe76f548b95db6c8509b7142ce386950a46c96
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Tue, 27 Oct 2026 22:56:51 +0100

fix: robustness catch

Diffstat:
Mindex.php | 13+++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/index.php b/index.php @@ -154,6 +154,11 @@ // Process Entries foreach ($channel_xml["entry"] as $entry) { + // Robustness: Skip entry if it is not an array (broken return) + if (!is_array($entry)) { + continue; + } + // Skip entry if it is a short $uri = $entry["link"]["@attributes"]["href"]; if (preg_match('/\/shorts\//', $uri) > 0) { @@ -310,13 +315,7 @@ <!-- Video List --> <?php - $index = 0; foreach ($videos as $video) { - - /* Stop if 500 videos are listed */ - /*if ($index >= 500) { - break; - }*/ ?> <section id="video_<?php echo $video["vid"]; ?>"> @@ -386,8 +385,6 @@ <?php - $index++; - } ?>