Hmm. It's times like this that the coffee isn't fixing my problem, so I'm going to post in Absolute Beginners.
Can somebody spot the error in this nested ternary that I'm missing (and don't say the error is using a ternary, I'll poke you in the eye)? The preceding operation is there as a test and produces the desired result. The nested version is producing a fail. Fail!