Fixed undefined variable in func.rest.php