tron-php icon indicating copy to clipboard operation
tron-php copied to clipboard

Undefined array key "result"

Open vanodevium opened this issue 11 months ago • 0 comments

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.

vanodevium avatar Jan 22 '25 09:01 vanodevium