rafaelwendel / phpsupabase

PHP Client to use Supabase
MIT License
187 stars 18 forks source link

fix: returns an array instead of an object #13

Closed solarscreen closed 1 year ago

solarscreen commented 1 year ago

Hello,

During our developments using your library, we noticed that when we use the "getFirstResult" function present in the "Database" class, in case of empty result, a PHP exception is raised.

This is due to the fact that you specify a return in object, but in the case of an empty result, it is an array that is returned.

We have modified your class so that it returns an object according to the typing in place.

Have a nice day, The Solar Screen team