Fix PHP notice: undefined variable. noref