Fix PHP error notice by moving this declaration earlier