Skip to content

Undefined array key "result" #52

Description

@vanodevium

I try to perform transfer() with TRC20

But there is a PHP error with block of code:

from line 93

        if (isset($response['result']) && $response['result'] == true) {
            return new Transaction(
                $body['transaction']['txID'],
                $body['transaction']['raw_data'],
                'PACKING'
            );
        } else {
            throw new TransactionException(hex2bin($response['result']['message']));
        }

Because for throw new TransactionException(hex2bin($response['result']['message'])); $response may not have result field.

@Fenguoz Please fix it

Of course I can make PR for this code error but I can't understand business logic of this operations. Sorry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions