From 5db1855424971cb82ae0ef20b84cced99590bef6 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Thu, 15 Jun 2017 19:17:07 +0100 Subject: [PATCH] added extra claim null check --- src/Shell/BlockShell.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Shell/BlockShell.php b/src/Shell/BlockShell.php index ac5e86c..ea1aa4e 100644 --- a/src/Shell/BlockShell.php +++ b/src/Shell/BlockShell.php @@ -741,6 +741,11 @@ class BlockShell extends Shell { $all_claim_data = $this->_getclaimfortxout($out['ScriptPubKeyAsm'], $tx_hash, $out['Vout'], $block_ts); $claim = $all_claim_data['claim_data']; $claim_stream_data = $all_claim_data['claim_stream_data']; + + if (!$claim) { + break; + } + if ($claim['ClaimType'] == 2 && !$claim_stream_data) { echo "***claim stream data missing for streamType claim\n"; $data_error = true; @@ -749,6 +754,7 @@ class BlockShell extends Shell { $claim_entity = $this->Claims->newEntity($claim); $res = $this->Claims->save($claim_entity); + if (!$res) { echo "***claim could not be saved.\n"; $data_error = true;