Fixed null error in php 5.4 in setting default date formats