Reading the error.log it seems the proc was supposed to return an integer value but it returned null while executed the multirow
Btw, this proc rating::rate::free isn't listed on openacs/api-doc website. So i couldn't look at its source to point out where the error can be.
My advice is to take a look at the select queries. Try to test them separately using psql-shell or pgadmin.
That's one way to debug errors.