Re: Website Comments 1.05 Error - Trying to access array offset on value of type bool

By Dave - February 2, 2024

Hi Glenn, 

Try adding this line: $isSubscribed = false; // ADD THIS LINE

function wsc_thread_isSubscribed($tableOrTag, $recordNum) {
  global $CURRENT_USER;
  $isSubscribed = false; // ADD THIS LINE

  if (!empty( $CURRENT_USER )) {
    $isSubscribed = mysql_count('_wsc_subscribers', array(
      'userNum'    => $CURRENT_USER['num'],
      'tableOrTag' => $tableOrTag,
      'recordNum'  => $recordNum,
    ));
  }
  
  return (bool) $isSubscribed;
}

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com

By glennp - February 2, 2024

That worked! Thanks, Dave!

Glenn