Fix #1334 PHP Notice: Undefined variable: category