Undefined index error.

$grantAmount[$dao->id] was being used in a += operation without making sure it was defined in the first place.
Everything appeared to work regardless of this but this change fixes that specific declaration.