aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fblikebutton.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/fblikebutton.module b/fblikebutton.module
index 3ab8693..984f54f 100644
--- a/fblikebutton.module
+++ b/fblikebutton.module
@@ -55,7 +55,7 @@ function fblikebutton_node_view($node, $view_mode) {
$full = ($view_mode == 'full') ? TRUE : FALSE;
$show = ( ! empty($types[$node->type]) && user_access('access fblikebutton'));
$likebase = $base_url . '/';
- $likepath = drupal_get_path_alias($node->uri['path']);
+ $likepath = drupal_get_path_alias(isset($node->uri) ? $node->uri['path'] : sprintf('node/%u', $node->nid));
$webpage_to_like = $likebase . $likepath;
$likebutton_weight = variable_get('fblikebutton_weight', '0');
$conf = array(