Commit b3bdee99 authored by Johnny vd Laar's avatar Johnny vd Laar
Browse files

Issue #1978630, Notices when nodeblock array doesn't exist.

parent 6c286f2a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -300,7 +300,6 @@ function _nodeblock_machine_name_exists($value) {
  $query = db_select('nodeblock', 'nb')
    ->condition('machine_name', $value);
  $query->addExpression('count(*)', 'counts');

  return $query->execute()->fetchColumn() > 0;
}

@@ -513,7 +512,7 @@ function nodeblock_block_view($delta = '') {
  }

  $node = nodeblock_load_nodeblock($delta);
  if (!node_access('view', $node) || !nodeblock_type_enabled($node->type)) {
  if (!node_access('view', $node) || !nodeblock_type_enabled($node->type) || !isset($node->nodeblock)) {
    return;
  }