diff options
-rw-r--r-- | FtechWebring.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/FtechWebring.php b/FtechWebring.php index cca1a79..bd99318 100644 --- a/FtechWebring.php +++ b/FtechWebring.php @@ -85,10 +85,14 @@ if ($raw !== false) { if (isset($sites[$thisSite - 1])) { // We check if there's a previous site in the list $previous = $sites[$thisSite - 1]["url"]; + } else { + $previous = $sites[count($sites) - 1]["url"]; // If this is the first site, roll out to the last one } if (isset($sites[$thisSite + 1])) { // We check if there's a next site in the list $next = $sites[$thisSite + 1]["url"]; + } else { + $next = $sites[0]["url"]; // If this is the last site, roll out to the first one } echo(" |