Fix php error on task form. closes #2750