fix php undefined notice