Fix PHP compatibility problem