fix notice warnings under php 5.3