summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--colorbox.theme.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/colorbox.theme.inc b/colorbox.theme.inc
index d90ec6f..15baf19 100644
--- a/colorbox.theme.inc
+++ b/colorbox.theme.inc
@@ -48,7 +48,7 @@ function theme_colorbox_image_formatter($variables) {
}
// Build the gallery id.
- $nid = $node->nid ? $node->nid : 'nid';
+ $nid = !empty($node->nid) ? $node->nid : 'nid';
switch (variable_get('colorbox_imagefield_gallery', 1)) {
case 0:
$gallery_id = 'all';