Fixed some PHP warnings