Support

Account

Home Forums General Issues Warning: Trying to access array offset on value of type bool

Helping

Warning: Trying to access array offset on value of type bool

  • Hallo , ich habe diesen Fehler auf der Startseite

    Warning: Trying to access array offset on value of type bool

    in dieser in der 2. Rheihe und 5. Reihe

    {
    $curGroup = Functions::getGroupData($curPoster['userGroup']);
    $curPoster['userGroup'] = $curGroup[1];
    //Use the group's avatar if user has none
    if(empty($curPoster['userAvatar']))
    $curPoster['userAvatar'] = $curGroup[2];
    }

    was muss ich dort ändern ?
    Das forum läuft auf php8.0

  • You always need to check a value is what you expect, like an array, before access its properties.

    I have no idea what this is, but it is returning false instead of what you expect it to return

    
    $curGroup = Functions::getGroupData($curPoster['userGroup']);
    

    either that of $curPoster['userGroup'] does not exist, where is this set

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.