title: PHP Notice: Trying to access array offset on value of type bool in
body: <p>I get the following error in PHP 7.4</p>
  
  <blockquote>
  <pre><code> Trying to access array offset on value of type bool in
  </code></pre>
  </blockquote>
  
  <p>When running this function</p>
  
  <pre><code>function check_admin($user)
  { 
       $is_admin = mssql_fetch_array(mssql_query("Select * from Accounts where [Name] = '".$user."'"));
           array();
           if($is_admin['name'] != false){
              if($is_admin['ip'] != ip($user)){
                  return false;
              }
              else{
                  return array($is_admin['name'],$is_admin['gm_level'],$is_admin['ip']);  
                  }  
              }
              else{
                  return false;
              }   
  }
  </code></pre>
  
  <p>Any idea how to fix it?</p>