The issue here is when a volunteer hasn't included the referees. Since there are 2 referees, the code from line 557 onward assume that 'referees' is an array and tries to get the elements in the array as 'referees[0].name' etc. But since there aren't any records in the database, the object returned is not an array. Hence, an exception is thrown whenever you try to view a profile of a volunteer. This is only thrown in the debug mode though.
To recreate the scenario, login as an NVS admin and try to view the profile of one of the pending approvals for volunteers.
The issue here is when a volunteer hasn't included the referees. Since there are 2 referees, the code from line 557 onward assume that 'referees' is an array and tries to get the elements in the array as 'referees[0].name' etc. But since there aren't any records in the database, the object returned is not an array. Hence, an exception is thrown whenever you try to view a profile of a volunteer. This is only thrown in the debug mode though.
To recreate the scenario, login as an NVS admin and try to view the profile of one of the pending approvals for volunteers.