Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: get_object_vars() #39

Closed
multiplehats opened this issue Oct 25, 2024 · 0 comments · Fixed by #40
Closed

Uncaught TypeError: get_object_vars() #39

multiplehats opened this issue Oct 25, 2024 · 0 comments · Fixed by #40

Comments

@multiplehats
Copy link

multiplehats commented Oct 25, 2024

When I try the following query:

$results = Promotion::list();

It throws the following error:

[25-Oct-2024 13:29:08 UTC] PHP Fatal error:  Uncaught TypeError: get_object_vars(): Argument #1 ($object) must be of type object, array given in /Users/jayden/Code/piggy/apps/plugin/vendor/piggy/piggy-php-sdk/src/StaticMappers/Vouchers/PromotionMapper.php:18
Stack trace:
#0 /Users/jayden/Code/piggy/apps/plugin/vendor/piggy/piggy-php-sdk/src/StaticMappers/Vouchers/PromotionMapper.php(18): get_object_vars(Array)
#1 /Users/jayden/Code/piggy/apps/plugin/vendor/piggy/piggy-php-sdk/src/StaticMappers/Vouchers/PromotionsMapper.php(12): Piggy\Api\StaticMappers\Vouchers\PromotionMapper::map(Object(stdClass))
#2 /Users/jayden/Code/piggy/apps/plugin/vendor/piggy/piggy-php-sdk/src/Models/Vouchers/Promotion.php(135): Piggy\Api\StaticMappers\Vouchers\PromotionsMapper::map(Array)
#3 /Users/jayden/Code/piggy/apps/plugin/src/Api/Connection.php(353): Piggy\Api\Models\Vouchers\Promotion::list()

Am I missing something?

For account:

ID: 14347
Uuid: 8172d373-59fc-45e1-bfd0-5cab3125d0ea

@EdingerMike EdingerMike linked a pull request Oct 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant