Fixed Bug on profile

XenHack2

New Member
Good Evening,

We can not go on our profile, there is a bug .

Code:
Fatal error: Cannot unset string offsets in /var/www/vhosts/xxxxxxxxx.xxx/httpdocs/library/Nobita/Teams/Route/Prefix/Teams.php on line 103
 
Open the file. library/Nobita/Teams/Route/Prefix/Teams.php

Find this line:
PHP:
if (!empty($data[Nobita_Teams_Banning::BANNING_ID_KEY]))
        {
            $banData = Nobita_Teams_Banning::getBanningParamsFromData($data);
            if ($banData)
            {
                $extraParams['team_id'] = array_shift($banData);
                $extraParams['type']     = array_shift($banData);
                $extraParams['user_id'] = array_shift($banData);
            }
            unset($data[Nobita_Teams_Banning::BANNING_ID_KEY]);
        }
Replace by:
PHP:
if (isset($data[Nobita_Teams_Banning::BANNING_ID_KEY]) && is_array($data))
        {
            $banData = Nobita_Teams_Banning::getBanningParamsFromData($data);
            if ($banData)
            {
                $extraParams['team_id'] = array_shift($banData);
                $extraParams['type']     = array_shift($banData);
                $extraParams['user_id'] = array_shift($banData);
            }
            unset($data[Nobita_Teams_Banning::BANNING_ID_KEY]);
        }
 
Last edited:
Back
Top