You set $selfError = true, and then 2 lines later set it false, why not just leave it true?