diff --git a/install/steps/7-finish.php b/install/steps/7-finish.php index 0d95863a..84c2cce4 100644 --- a/install/steps/7-finish.php +++ b/install/steps/7-finish.php @@ -93,6 +93,8 @@ if(USE_ACCOUNT_SALT) $account_used->setCustomField('web_flags', FLAG_ADMIN + FLAG_SUPER_ADMIN); $account_used->setCustomField('country', 'us'); +$account_used->setCustomField('email_verified', 1); + if($db->hasColumn('accounts', 'group_id')) $account_used->setCustomField('group_id', $groups->getHighestId()); if($db->hasColumn('accounts', 'type')) diff --git a/phpstan.neon b/phpstan.neon index b77bc1d2..fda6a07c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -29,6 +29,7 @@ parameters: - '#Variable \$[a-zA-Z0-9\\_]+ might not be defined#' # Eloquent models - '#Call to an undefined static method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+()#' + - '#Call to an undefined method object::toArray\(\)#' # system/pages/highscores.php - '#Call to an undefined method Illuminate\\Database\\Query\\Builder::withOnlineStatus\(\)#' - '#Access to an undefined property Illuminate\\Database\\Eloquent\\Model::\$online_status#' diff --git a/system/pages/monsters.php b/system/pages/monsters.php index f8a8a66a..988d15b5 100644 --- a/system/pages/monsters.php +++ b/system/pages/monsters.php @@ -39,10 +39,11 @@ if (empty($_REQUEST['name'])) { // display monster $monster_name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name'])))); -$monster = Monster::where('hide', '!=', 1)->where('name', $monster_name)->first(); +$monsterModel = Monster::where('hide', '!=', 1)->where('name', $monster_name)->first(); -if ($monster && isset($monster->name)) { - $monster = $monster->toArray(); +if ($monsterModel && isset($monsterModel->name)) { + /** @var array $monster */ + $monster = $monsterModel->toArray(); function sort_by_chance($a, $b) { diff --git a/system/templates/highscores.html.twig b/system/templates/highscores.html.twig index 90a833c6..8a2c78a6 100644 --- a/system/templates/highscores.html.twig +++ b/system/templates/highscores.html.twig @@ -11,7 +11,7 @@ @@ -105,7 +105,7 @@ {% for link, name in types %} - {{ name }}
+ {{ name }}
{% endfor %}