Index: template.php
===================================================================
--- template.php	(revision 169)
+++ template.php	(working copy)
@@ -41,7 +41,7 @@
   if (!empty($vars['secondary_links'])) {
     $body_classes[] = 'with-secondary';
   }
-  if (module_exists('taxonomy') && $vars['node']->nid) {
+  if (module_exists('taxonomy') && !empty($vars['node']->nid)) {
     foreach (taxonomy_node_get_terms($vars['node']) as $term) {
     $body_classes[] = 'tax-' . eregi_replace('[^a-z0-9]', '-', $term->name);
     }
@@ -101,10 +101,10 @@
    * like this : page-node-22.tpl.php (if the node ID is 22)
    */
   
-  if ($vars['node']->type != "") {
+  if (!empty($vars['node']->type)) {
       $vars['template_files'][] = "page-type-" . $vars['node']->type;
     }
-  if ($vars['node']->nid != "") {
+  if (!empty($vars['node']->nid)) {
       $vars['template_files'][] = "page-node-" . $vars['node']->nid;
     }
   $vars['body_classes'] = implode(' ', $body_classes); // Concatenate with spaces
@@ -423,4 +423,4 @@
   }
   // Otherwise, return an empty string.
   return '';
-}
\ No newline at end of file
+}
Index: templates/block.tpl.php
===================================================================
--- templates/block.tpl.php	(revision 169)
+++ templates/block.tpl.php	(working copy)
@@ -9,7 +9,9 @@
       <?php print $block->content; ?>
     </div>
 
-    <?php print $edit_links; ?>
+    <?php if (isset($edit_links)): ?>
+      <?php print $edit_links; ?>
+    <?php endif; ?>
 
   </div> <!-- /block-inner -->
-</div> <!-- /block -->
\ No newline at end of file
+</div> <!-- /block -->
