explorer: prevent php error on invalid txid

This commit is contained in:
Tanguy Pruvot 2015-09-26 06:52:07 +02:00
parent 9d4c4d41c7
commit 6060d42ca3

View file

@ -32,7 +32,7 @@ class ExplorerController extends CommonController
$remote = new Bitcoin($coin->rpcuser, $coin->rpcpasswd, $coin->rpchost, $coin->rpcport);
$tx = $remote->getrawtransaction($txid, 1);
$hash = $tx['blockhash'];
$hash = arraySafeVal($tx,'blockhash');
}
if($coin && !empty($hash) && ctype_alnum($hash))