php notice fixed, array key checking