fixed php warning and code spacing