Hopefully this advice won't have practical significance for the vast majority of readers here. Still, there's a lesson here from today's opinion, and it's a meaningful one for those to whom it applies. So here it is:
Don't tell your therapist that you've ever viewed child pornography. If you do, they'll be required to report you to the authorities, under penalty of losing their license and/or going to prison if they don't.
Admittedly, in a 4-3 opinion, the California Supreme Court holds that it's possible that this statute might violate the state constitutional right to privacy, at least as applied to those patients who are getting treatment and aren't likely to do it again. But the dissent thinks otherwise. And the Court -- weary of being perceived as coddling child molesters -- makes clear that it's just saying that the trial court shouldn't have granted a demurrer, and instead should take evidence about whether the statute indeed constitutionally advances a legitimate state interest as applied to that group of patients.
Nonetheless, as a practical matter, at least while the lawsuit's pending -- which practically means, for years -- unless you want to be turned in to the police, you'll have to be content with simply telling your doctor that you've done "bad things." That's not going to be very helpful in getting you treated, of course. But at least you won't go to prison for the rest of your life.