diff --git a/app/Http/Middleware/SetInviteDb.php b/app/Http/Middleware/SetInviteDb.php index 867b304f31..a165fda3a4 100644 --- a/app/Http/Middleware/SetInviteDb.php +++ b/app/Http/Middleware/SetInviteDb.php @@ -59,7 +59,7 @@ class SetInviteDb $hashed_db = $hashids->decode($segments[0]); } - if(is_array($hashed_db) && ($hashed_db[0] == "01" || $hashed_db[0] == "02")){ + if($hashed_db && is_array($hashed_db) && ($hashed_db[0] == "01" || $hashed_db[0] == "02")){ MultiDB::setDB(MultiDB::DB_PREFIX.str_pad($hashed_db[0], 2, '0', STR_PAD_LEFT));