Skip to content

Commit

Permalink
Fix non traversable case
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 3, 2021
1 parent 08dbe74 commit 36c6a41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions htdocs/blockedlog/ajax/check_signature.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@

$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();
Expand Down
6 changes: 4 additions & 2 deletions htdocs/blockedlog/class/authority.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ public function getLocalBlockChain()

$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;
Expand Down

0 comments on commit 36c6a41

Please sign in to comment.