Index: modules/book.module
===================================================================
RCS file: /home/augustin/mycvs/my-drupal/modules/book.module,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 book.module
--- modules/book.module	4 Nov 2005 05:14:49 -0000	1.1.1.3
+++ modules/book.module	4 Nov 2005 06:49:25 -0000
@@ -561,8 +561,9 @@ function book_toc($exclude = 0) {
  * This is a helper function for book_tree()
  */
 function book_tree_recurse($nid, $depth, $children, $unfold = array()) {
+  $ouput ='';
   if ($depth > 0) {
-    if ($children[$nid]) {
+    if (!empty($children[$nid])) {
       foreach ($children[$nid] as $foo => $node) {
         if (in_array($node->nid, $unfold)) {
           if ($tree = book_tree_recurse($node->nid, $depth - 1, $children, $unfold)) {
@@ -598,7 +599,7 @@ function book_tree($parent = 0, $depth =
   $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.parent, b.weight FROM {node} n INNER JOIN {book} b ON n.vid = b.vid WHERE n.status = 1 AND n.moderate = 0 ORDER BY b.weight, n.title'));
 
   while ($node = db_fetch_object($result)) {
-    $list = $children[$node->parent] ? $children[$node->parent] : array();
+    $list = !empty($children[$node->parent]) ? $children[$node->parent] : array();
     array_push($list, $node);
     $children[$node->parent] = $list;
   }
Index: modules/forum.module
===================================================================
RCS file: /home/augustin/mycvs/my-drupal/modules/forum.module,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 forum.module
--- modules/forum.module	4 Nov 2005 05:14:49 -0000	1.1.1.3
+++ modules/forum.module	4 Nov 2005 06:55:52 -0000
@@ -407,7 +407,7 @@ function forum_link($type, $node = 0, $m
     $result = db_query($sql, $node->tid);
 
     while ($topic = db_fetch_object($result)) {
-      if ($stop == 1) {
+      if (isset($stop) && $stop == 1) {
         $next = new StdClass();
         $next->nid = $topic->nid;
         $next->title = $topic->title;
@@ -423,11 +423,11 @@ function forum_link($type, $node = 0, $m
       }
     }
 
-    if ($prev) {
+    if (!empty($prev)) {
       $links[] = l(t('previous forum topic'), "node/$prev->nid", array('title' => check_plain($prev->title)));
     }
 
-    if ($next) {
+    if (!empty($next)) {
       $links[] = l(t('next forum topic'), "node/$next->nid", array('title' => check_plain($next->title)));
     }
   }
@@ -650,7 +650,7 @@ function forum_get_forums($tid = 0) {
       $forum->container = 1;
     }
 
-    if ($counts[$forum->tid]) {
+    if (!empty($counts[$forum->tid])) {
       $forum->num_topics = $counts[$forum->tid]->topic_count;
       $forum->num_posts = $counts[$forum->tid]->topic_count + $counts[$forum->tid]->comment_count;
     }
@@ -880,7 +880,7 @@ function theme_forum_list($forums, $pare
     $header = array(t('Forum'), t('Topics'), t('Posts'), t('Last post'));
 
     foreach ($forums as $forum) {
-      if ($forum->container) {
+      if (!empty($forum->container)) {
         $description  = '<div style="margin-left: '. ($forum->depth * 30) ."px;\">\n";
         $description .= ' <div class="name">'. l($forum->name, "forum/$forum->tid") ."</div>\n";
 
Index: modules/node.module
===================================================================
RCS file: /home/augustin/mycvs/my-drupal/modules/node.module,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 node.module
--- modules/node.module	4 Nov 2005 05:14:50 -0000	1.1.1.3
+++ modules/node.module	4 Nov 2005 06:59:11 -0000
@@ -72,7 +72,7 @@ function node_cron() {
  */
 function node_title_list($result, $title = NULL) {
   while ($node = db_fetch_object($result)) {
-    $items[] = l($node->title, 'node/'. $node->nid, $node->comment_count ? array('title' => format_plural($node->comment_count, '1 comment', '%count comments')) : '');
+    $items[] = l($node->title, 'node/'. $node->nid, !empty($node->comment_count) ? array('title' => format_plural($node->comment_count, '1 comment', '%count comments')) : '');
   }
 
   return theme('node_list', $items, $title);
@@ -346,7 +346,7 @@ function node_load($param = array(), $re
 
   if (is_numeric($param)) {
     $cachable = $revision == NULL;
-    if ($cachable && isset($nodes[$param])) {
+    if (!empty($cachable) && isset($nodes[$param])) {
       return $nodes[$param];
     }
     $cond = 'n.nid = '. $param;
Index: modules/taxonomy.module
===================================================================
RCS file: /home/augustin/mycvs/my-drupal/modules/taxonomy.module,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 taxonomy.module
--- modules/taxonomy.module	4 Nov 2005 05:14:50 -0000	1.1.1.3
+++ modules/taxonomy.module	4 Nov 2005 07:01:54 -0000
@@ -769,7 +769,7 @@ function taxonomy_get_tree($vid, $parent
   }
 
   $max_depth = (is_null($max_depth)) ? count($children[$vid]) : $max_depth;
-  if ($children[$vid][$parent]) {
+  if (!empty($children[$vid][$parent])) {
     foreach ($children[$vid][$parent] as $child) {
       if ($max_depth > $depth) {
         $terms[$vid][$child]->depth = $depth;
@@ -778,7 +778,7 @@ function taxonomy_get_tree($vid, $parent
         $terms[$vid][$child]->parents = $parents[$vid][$child];
         $tree[] = $terms[$vid][$child];
 
-        if ($children[$vid][$child]) {
+        if (!empty($children[$vid][$child])) {
           $tree = array_merge($tree, taxonomy_get_tree($vid, $child, $depth, $max_depth));
         }
       }
Index: modules/upload.module
===================================================================
RCS file: /home/augustin/mycvs/my-drupal/modules/upload.module,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 upload.module
--- modules/upload.module	4 Nov 2005 05:14:50 -0000	1.1.1.3
+++ modules/upload.module	4 Nov 2005 07:03:22 -0000
@@ -75,7 +75,7 @@ function upload_menu($may_cache) {
   }
   else {
     // Add handlers for previewing new uploads.
-    if ($_SESSION['file_uploads']) {
+    if (!empty($_SESSION['file_uploads'])) {
       foreach ($_SESSION['file_uploads'] as $key => $file) {
         $filename = file_create_filename($file->filename, file_create_path());
         $items[] = array(
