警告:尝试访问 sql.php 中 bool 类型值的数组偏移量

问题描述 投票:0回答:0

我有这个错误

警告:尝试访问 bool 类型值的数组偏移量 第 195 行的 sql.php

当我从一个页面导航到另一个页面时,它出现在所有页面之间,这个错误出现并立即消失,但它出现并在查看销售报告时仍然存在。

/*--------------------------------------------------------------*/
  /* Function for checking which user level has access to the page
  /*--------------------------------------------------------------*/
   function page_require_level($require_level){
     global $session;
     $current_user = current_user();
     $login_level = find_by_groupLevel($current_user['user_level']);
     //if user not login
     if (!$session->isUserLoggedIn(true)):
            $session->msg('d','Please Sign in');
            redirect('index.php', false);
      //if Group status Deactive
     elseif($login_level['group_status'] === '0'):  //Line 195
           $session->msg('d','User Banned');
           redirect('home.php',false);
      //checking logged in User level and Require level is Less than or equal to
     elseif($current_user['user_level'] <= (int)$require_level):
              return true;
      else:
            $session->msg("d", "Error");
            redirect('home.php', false);
        endif;

     }
php arrays boolean offset
© www.soinside.com 2019 - 2024. All rights reserved.