mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix if highscores_vocation box is disabled causing Choose a vocation dropdown to fail
This commit is contained in:
parent
749e8e6f02
commit
ddced132cf
@ -31,12 +31,11 @@ if(!is_numeric($page) || $page < 1 || $page > PHP_INT_MAX) {
|
||||
|
||||
$query = Player::query();
|
||||
|
||||
$settingHighscoresVocationBox = setting('core.highscores_vocation_box');
|
||||
$configVocations = config('vocations');
|
||||
$configVocationsAmount = config('vocations_amount');
|
||||
|
||||
$vocationId = null;
|
||||
if($settingHighscoresVocationBox && $vocation !== 'all') {
|
||||
if($vocation !== 'all') {
|
||||
foreach($configVocations as $id => $name) {
|
||||
if(strtolower($name) == $vocation) {
|
||||
$vocationId = $id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user