Fix some php errors