rshariffdeen / NVS

MIT License
1 stars 0 forks source link

Volunteer.html.twig referring to a non-array object, as an array in line 557 #35

Open pubudu91 opened 9 years ago

pubudu91 commented 9 years ago

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.