Another patch to remove notices
pletcher - December 16, 2008 - 13:31
| Project: | Creative Commons Lite |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Small patch which doesn't change anything functionally, just removes notices by defining variables, and using isset() as opposed to &&.
Index: creativecommons_lite.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/creativecommons_lite/creativecommons_lite.module,v
retrieving revision 1.3.2.2
diff -u -p -r1.3.2.2 creativecommons_lite.module
--- creativecommons_lite.module 14 Nov 2008 07:00:28 -0000 1.3.2.2
+++ creativecommons_lite.module 16 Dec 2008 13:09:52 -0000
@@ -272,8 +272,9 @@ function creativecommons_lite_block($op=
$nid = (int)arg(1);
$node = node_load(array('nid'=>$nid));
-
- if ( $node && arg(0) == 'node' && ( $node->cc_lite_license ) && ( (arg(2)=='view') || (arg(2)=='') ) ) {
+ $block = array();
+
+ if ( $node && arg(0) == 'node' && isset($node->cc_lite_license) && ( (arg(2)=='view') || (arg(2)=='') ) ) {
if ($node->cc_lite_license) {
// append html
$output = get_license_html($node->cc_lite_license);
@@ -282,9 +283,9 @@ function creativecommons_lite_block($op=
$block['content'] = '<p class="creativecommons">'.$output.'</p>';
}
}
+
+ return $block;
}
-
- return $block;
}
}
}