Skip to content

Undefined variable: item #471

Open
Open
@Aulerien

Description

@Aulerien

Undefined variable: item

  • bug

Short Description:
In the file vendor/jaggedsoft/php-binance-api/php-binance-api.php, inside the function depositHistory the error occured on foreach ($return as $key->$item) {

// Adding for backwards compatibility with wapi
        foreach ($return as $key->$item) {
            $return[$key]['asset'] = $item['coin'];
        }

Platform:

  • linux

php version:

  • 7.4

Long descrption

  • The method depositHistory in vendor/jaggedsoft/php-binance-api/php-binance-api.php

code

//...
$api_key = env('BINANCE_API_KEY');
$api_secret = env('BINANCE_API_SECRET');
$binance_api = new \Binance\API($api_key, $api_secret);
$depositHistory = $binance_api->depositHistory();
dump($depositHistory);
;

result

Undefined variable: item

thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions