Closed php-wizard closed 2 years ago
I have also tried to pass the param like this, as an array of arrays
["destinations"=> [[ "amount"=>sprintf("%.12f",$amount), "address"=>$address], ["amount"=>sprintf("%.12f",$amount2), "address"=>$address2]] ]
But now i get another fatal error
ErrorException : Illegal offset type
at /www/wwwroot/myproject/vendor/monero-integrations/monerophp/src/walletRPC.php:498
494| throw new Exception('Error: destinations must be an array');
495| }
496|
497| foreach ($destinations as $destination) {
> 498| if (array_key_exists('amount', $destinations[$destination])) {
499| $destinations[$destination]['amount'] = $this->_transform($destinations[$destination]['amount']);
500| } else {
501| throw new Exception('Error: Amount required');
502| }
I think the implementation is wrong. Will take a look when I have some free time.
Could you try my php8 branch on my fork?
I must use php 7.3
Hello, i have tried the
transfer
method passing an array as the first parameter, with the "destinations" array key, like thisSo i followed the example call in your example.php file
And i get this dump and a runtime error from the monerophp method
Not only i get the error, but
$params
in the dump has just one address and one amount, not two , maybe due to PHP not allowing 2 equal indexes occurring at the same time in an array. So how can i achieve what i want? (sending 2 outputs)