Fix compatibility issue with lower verison of PHP