fix fatal error on php 5.3

php 5.3 not allowed function call in empty()