megawubs / trakt-api-wrapper

A Object Oriented PHP wrapper for the trakt api
34 stars 19 forks source link

toArray() not working on Movies #12

Closed m-vdv closed 8 years ago

m-vdv commented 9 years ago

Error:

Attempted to call an undefined method named "toArray" of class "Wubs\Trakt\Api\Movies".

megawubs commented 8 years ago

What's the code that generates this error?

m-vdv commented 8 years ago

@megawubs $trakt->movies->withImages()->withFull()->summary($token,$id)->toArray();

megawubs commented 8 years ago

Are you sure it's Wubs\Trakt\Api\Movies and not Wubs\Trakt\Media\Movie? Because this call returns one movie object, it's automatically converted to a Wubs\Trakt\Media\Movie instance. So it's not a collection

m-vdv commented 8 years ago

After the master update it is indeed: Error: Cannot use object of type Wubs\Trakt\Media\Movie as array

megawubs commented 8 years ago

@webslash Wroking on a fix for it now