fixed php notice undefined variable