Fixed: user_get_pref_names should always return an array.
Changed: Add $_COOKIE and $_SESSION to error reporting output.