I'm trying to make a block display on a specific page and inside a node type; I got this code from drupal.org, but I keep getting this error.
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /home/content/45/6861545/html/includes/entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of /home/content/45/6861545/html/includes/entity.inc).
This is the code I used.
$match = FALSE;
$types = array('middle_content' => 1);
if (arg(0) == 'node' && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array('nid' => $nid));
$type = $node->type;
if (isset($types[$type])) {
$match = TRUE;
}
}
if (substr($_SERVER["REQUEST_URI"], 0, 10) == '/test'){
$match = TRUE;
}
if (substr($_SERVER["REQUEST_URI"], 0) == "/node/add/middle_content") {
$match = TRUE;
}
return $match;