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

3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: February 2   (RSS)

By Dave - February 2

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

That worked! Thanks, Dave!

Glenn