invoiceninja / sdk-php

PHP wrapper for Invoice Ninja's REST API
https://www.invoiceninja.com
83 stars 41 forks source link

Error in RemoteModel #4

Closed timo002 closed 7 years ago

timo002 commented 7 years ago

I believe there is an error on line 36 of RemoteModel.php

33    public static function find($id)
34    {
35        $url = static::getRoute() . '/' . $id;
36        $data = static::sendRequest();
37
38        return static::hydrate($data);
39    }

Line 36 should be:

36        $data = static::sendRequest($url);
marcoboers commented 7 years ago

This was fixed in (now) abstractModel.php

timo002 commented 7 years ago

Hmm, I installed with composer, but my code is different from this code on github. composer.json:

"invoiceninja/sdk-php": "^0.2.0"

image

timo002 commented 7 years ago

I installed with

composer require invoiceninja/sdk-php

But that gave me version 0.2.0.

I changed the composer.json file to 'dev-master' and now it's fine!

hillelcoren commented 7 years ago

I've created a new release which includes this fix.