How to fix Uninitialized string offset: error on a checkbox in WP Settings API

Most likely your $options is a string and not an array.

It is always better to validate that the $options are in the format you are expecting especially in development time when you are likely to switch formats and too lazy to clean the DB when doing that.

something like

if (!isset($options['hide_avatar'])) 
  $options['hide_avatar'] = 0;

Might have still resulted in a strange error, but it would have been little more easier to understand exactly where and maybe why.