undefined variable 'name' should be a constant