微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

注意:尝试访问 bool 类型值的数组偏移量

如何解决注意:尝试访问 bool 类型值的数组偏移量

您好,当我通过 Steam 连接到我的网站时遇到问题,它给了我错误

Notice: Trying to access array offset on value of type bool in /var/www/boutique.sky-community.com/index.PHP on line 67
Notice: Trying to access array offset on value of type bool in /var/www/boutique.sky-community.com/index.PHP on line 68
Notice: Trying to access array offset on value of type bool in /var/www/boutique.sky-community.com/index.PHP on line 69
Notice: Trying to access array offset on value of type bool in /var/www/boutique.sky-community.com/index.PHP on line 70
Notice: Trying to access array offset on value of type bool in /var/www/boutique.sky-community.com/index.PHP on line 71

这是我的 index.PHP 的一部分:

    if (!isset($_SESSION['gex_steamid64'])) {
        if (isset($_COOKIE['gex_loginsession'])) {
            $db->where('session',$_COOKIE['gex_loginsession']);
            $db->where('expires > Now()');

            $steamid64 = $db->getValue('sessions','steamid64');

            if ($db->count) {
                $db->where('session',$_COOKIE['gex_loginsession']);
                $db->update('sessions',array('expires' => $db->func('DATE_ADD(Now(),INTERVAL ? DAY)',array(30))));

                $_SESSION['gex_steamid64'] = $steamid64;

                setcookie('gex_loginsession',$_COOKIE['gex_loginsession'],time() + 2592000,'/');
            }
        }
    } elseif (isset($_GET['login_started'])) {
        $steamprofile = SteamAPI::GetUserData($_SESSION['gex_steamid64']);

        $steamid32 = $steamprofile['steamid32'];
        $nick = $steamprofile['personaname'];
        $avatar_small = $steamprofile['avatar'];
        $avatar_medium = $steamprofile['avatarmedium'];
        $avatar_large = $steamprofile['avatarfull'];

        $db->where('steamid64',$_SESSION['gex_steamid64']);
        $userdata = $db->getone('users');

        $ip = GetClientIP();
        $ips = array($ip);

        if ($db->count) {
            $sessionkey = hash('sha512',random_string(25).$userdata['random']); //(hash("sha256",md5('Ew97f9N3vq4' . $_SESSION['gex_steamid64'] . '86V' . $result['email'] . 'b93z7' . $_SERVER['HTTP_USER_AGENT'] . '4E$HSJH8gjsA' . $result['random'] . '3oikjfA')));

            setcookie('gex_loginsession',$sessionkey,'/');

只有在您登录时才完成,但无法正常工作,有人可以帮助我吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。