Commit 0fad2a3d authored by Dries's avatar Dries

- Patch #791490 by chx: contextual module calls menu_get_item() for unsaved...

- Patch #791490 by chx: contextual module calls menu_get_item() for unsaved nodes, resulting in pdo exception on postgresql.
parent 9239621a
......@@ -1222,7 +1222,7 @@ function node_view($node, $view_mode = 'full') {
// displayed on its own page. Modules may alter this behavior (for example,
// to restrict contextual links to certain view modes) by implementing
// hook_node_view_alter().
if (!node_is_page($node)) {
if (!empty($node->nid) && !node_is_page($node)) {
$build['#contextual_links']['node'] = array('node', array($node->nid));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment