Fix building with php8 and without config file
authorChristian Weiske <cweiske@cweiske.de>
Wed, 28 Jul 2021 15:19:34 +0000 (17:19 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 28 Jul 2021 15:19:34 +0000 (17:19 +0200)
bin/filters.php
bin/import-game-data.php

index f899be01fa58282307faf57a22c3bdf6163e68d4..b225c9bd8f90fa8b2d1b81492d1481c186de7327 100644 (file)
@@ -31,7 +31,7 @@ function filterByLetter($origGames, $letter)
 {
     $filtered = [];
     foreach ($origGames as $game) {
-        $gameLetter = strtoupper($game->title{0});
+        $gameLetter = strtoupper($game->title[0]);
         if (!preg_match('#^[A-Z]$#', $gameLetter)) {
             $gameLetter = 'Other';
         }
index 2685b3ffbc4da325652235a93002f48eda0733e0..ee6c1d971b8d835e1f025eb35add345ca3a17140 100755 (executable)
@@ -18,6 +18,7 @@ if (!is_file($foldersFile)) {
 }
 
 //default configuration values
+$GLOBALS['baseUrl']      = 'http://ouya.cweiske.de/';
 $GLOBALS['packagelists'] = [];
 $GLOBALS['urlRewrites']  = [];
 $cfgFile = __DIR__ . '/../config.php';