- Repair ternair expression that throw exception in php 5.2