rhysnhall / etsy-php-sdk

PHP SDK for Etsy API v3.
MIT License
47 stars 36 forks source link

Bug Fix: Update ListingInventory::get to be a static function #31

Closed chrismjones closed 3 months ago

chrismjones commented 3 months ago

PHP Fatal error: Uncaught Error: Non-static method Etsy\Resources\ListingInventory::get() cannot be called statically in /vendor/rhysnhall/etsy-php-sdk/src/Resources/Listing.php:516

When calling the Listing resource's inventory function, an error is thrown because it calls ListingInventory::get() statically, but ListingInventory's 'get' is not a static function.

When comparing resources, the get function is static in other resources, so this pull request resolves the error by making ListingInventory's get function static, bringing it in line with the rest of the resources.

rhysnhall commented 3 months ago

Ooft, that is sloppy on my behalf. Thanks for the fix.