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

Undefined property: stdClass::$subscription [/softr/asaas-php-sdk/src/Api/Subscription.php, line 32] #4

Open
MarcoNicolodi opened this issue Jul 11, 2016 · 0 comments

Comments

@MarcoNicolodi
Copy link

MarcoNicolodi commented Jul 11, 2016

no arquivo src/Api/Subscription.php, metodo getAll() há um problema no argumento passado no return new SubscriptionEntity($subscription->subscription), linha 30. Esse argumento vem do array map, e nao existe o objeto subscription dentro de $subscription->data;

aqui no meu caso eu troquei de

    return array_map(function($subscription)
    {
        return new SubscriptionEntity($subscription->subscription);
    }, $subscriptions->data);

para

    return array_map(function($subscription)
    {
        //nao há subscription->subscription, é um array, portando apenas $subscription funciona
        return new SubscriptionEntity($subscription);
    }, $subscriptions->data);

Aparentemente ouve o mesmo Issue no Api/Notifications e ja foi corrigido

@MarcoNicolodi MarcoNicolodi changed the title Undefined property: stdClass::$subscription [APP/Vendor/vendor/softr/asaas-php-sdk/src/Api/Subscription.php, line 32] Undefined property: stdClass::$subscription [/softr/asaas-php-sdk/src/Api/Subscription.php, line 32] Jul 11, 2016
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

No branches or pull requests

1 participant