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();
foreach ($blocks as &$b) {
$auth->blockchain .= $b->signature;
if (is_array($bocks)) {
foreach ($blocks as &$b) {
$auth->blockchain .= $b->signature;
}
}
$hash = $auth->getBlockchainHash();

View File

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