Fix non traversable case

This commit is contained in:
Laurent Destailleur 2021-05-04 01:14:44 +02:00
parent 08dbe74643
commit 36c6a41b1b
2 changed files with 8 additions and 4 deletions

View File

@ -55,8 +55,10 @@ $blocks = $block_static->getLog('just_certified', 0, 0, 'rowid', 'ASC');
$auth->signature = $block_static->getSignature(); $auth->signature = $block_static->getSignature();
foreach ($blocks as &$b) { if (is_array($bocks)) {
foreach ($blocks as &$b) {
$auth->blockchain .= $b->signature; $auth->blockchain .= $b->signature;
}
} }
$hash = $auth->getBlockchainHash(); $hash = $auth->getBlockchainHash();

View File

@ -71,9 +71,11 @@ class BlockedLogAuthority
$this->blockchain = ''; $this->blockchain = '';
if (is_array($bocks)) {
foreach ($blocks as &$b) { foreach ($blocks as &$b) {
$this->blockchain .= $b->signature; $this->blockchain .= $b->signature;
} }
}
return $this->blockchain; return $this->blockchain;
} }