Skip to content
Snippets Groups Projects
Commit 609df3ab authored by Nate Lampton's avatar Nate Lampton
Browse files

#152758 by danielnolde. Invalid node_load when previewing node form on new...

#152758 by danielnolde. Invalid node_load when previewing node form on new node with fivestar widget.
parent 2ad7a6b9
No related branches found
Tags 5.x-1.8
No related merge requests found
......@@ -498,7 +498,12 @@ function fivestar_form($content_type, $content_id, $style = 'default') {
}
if ($content_type == 'node') {
$node = node_load($content_id);
if (is_numeric($content_id)) {
$node = node_load($content_id);
}
else {
return array();
}
}
$stars = variable_get('fivestar_stars_'. (!isset($node) ? 'default' : $node->type), 5);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment