Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.130
diff -u -r1.130 form.inc
--- includes/form.inc	22 Jul 2006 19:26:58 -0000	1.130
+++ includes/form.inc	24 Jul 2006 02:13:52 -0000
@@ -333,7 +333,7 @@
         }
         elseif (!isset($options[$elements['#value']])) {
           form_error($elements, t('An illegal choice has been detected. Please contact the site administrator.'));
-          watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme_placeholder(check_plain($v)), '%name' => theme('placeholder', empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']))), WATCHDOG_ERROR);
+          watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme_placeholder(check_plain($elements['#value'])), '%name' => theme('placeholder', empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']))), WATCHDOG_ERROR);
         }
       }
     }
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.290
diff -u -r1.290 aggregator.module
--- modules/aggregator/aggregator.module	10 Jul 2006 19:27:52 -0000	1.290
+++ modules/aggregator/aggregator.module	24 Jul 2006 02:13:54 -0000
@@ -831,6 +831,8 @@
 
   $items = array_reverse($items);
 
+  // Initialize variables
+  $title = $link = $author = $description = $guid = NULL;
   foreach ($items as $item) {
     unset($title, $link, $author, $description, $guid);
 
@@ -1055,6 +1057,7 @@
 
   $result = pager_query($sql, 20);
   $categories = array();
+  $done = FALSE;
   while ($item = db_fetch_object($result)) {
     $form['items'][$item->iid] = array('#value' => theme('aggregator_page_item', $item));
     $output .= $form['items'][$item->iid]['#value'];
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.375
diff -u -r1.375 book.module
--- modules/book/book.module	19 Jul 2006 07:15:34 -0000	1.375
+++ modules/book/book.module	24 Jul 2006 02:13:55 -0000
@@ -554,6 +554,7 @@
 function book_toc($exclude = 0) {
   $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 ORDER BY b.weight, n.title'));
 
+  $children = array();
   while ($node = db_fetch_object($result)) {
     if (!$children[$node->parent]) {
       $children[$node->parent] = array();
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.468
diff -u -r1.468 comment.module
--- modules/comment/comment.module	19 Jul 2006 07:15:34 -0000	1.468
+++ modules/comment/comment.module	24 Jul 2006 02:13:56 -0000
@@ -1611,7 +1611,6 @@
 
 function theme_comment_flat_collapsed($comment) {
   return theme('comment_view', $comment, '', 0);
-  return '';
 }
 
 function theme_comment_flat_expanded($comment) {
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.127
diff -u -r1.127 filter.module
--- modules/filter/filter.module	19 Jul 2006 07:04:26 -0000	1.127
+++ modules/filter/filter.module	24 Jul 2006 02:13:57 -0000
@@ -845,7 +845,7 @@
     }
   }
   form_error($form, t('An illegal choice has been detected. Please contact the site administrator.'));
-  watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme('placeholder', check_plain($v)), '%name' => theme('placeholder', empty($form['#title']) ? $form['#parents'][0] : $form['#title']))), WATCHDOG_ERROR);
+  watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme('placeholder', check_plain($form[$key]['#value'])), '%name' => theme('placeholder', empty($form['#title']) ? $form['#parents'][0] : $form['#title']))), WATCHDOG_ERROR);
 }
 
 /**
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.338
diff -u -r1.338 forum.module
--- modules/forum/forum.module	11 Jul 2006 07:04:34 -0000	1.338
+++ modules/forum/forum.module	24 Jul 2006 02:13:58 -0000
@@ -1058,6 +1058,7 @@
   $sql = "SELECT n.nid, n.title, n.sticky, l.comment_count, l.last_comment_timestamp FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {term_node} r ON n.nid = r.nid AND r.tid = %d WHERE n.status = 1 AND n.type = 'forum' ORDER BY n.sticky DESC, ". _forum_get_topic_order_sql(variable_get('forum_order', 1));
   $result = db_query(db_rewrite_sql($sql), $node->tid);
 
+  $stop = 0;
   while ($topic = db_fetch_object($result)) {
     if ($stop == 1) {
       $next = new StdClass();
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.137
diff -u -r1.137 locale.module
--- modules/locale/locale.module	19 Jul 2006 06:23:44 -0000	1.137
+++ modules/locale/locale.module	24 Jul 2006 02:13:59 -0000
@@ -54,9 +54,9 @@
  */
 function locale_menu($may_cache) {
   $items = array();
-
-  if ($may_cache) {
-    $access = user_access('administer locales');
+  $access = user_access('administer locales');
+  
+  if ($may_cache) {  
 
     // Main admin menu item
     $items[] = array('path' => 'admin/locale',
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.202
diff -u -r1.202 poll.module
--- modules/poll/poll.module	10 Jul 2006 08:05:15 -0000	1.202
+++ modules/poll/poll.module	24 Jul 2006 02:13:59 -0000
@@ -570,6 +570,8 @@
 
   db_query('DELETE FROM {poll_choices} WHERE nid = %d', $node->nid);
   db_query('DELETE FROM {poll_votes} WHERE nid = %d', $node->nid);
+  
+  $i = 0;
   foreach ($node->choice as $choice) {
     $chvotes = (int)$choice['chvotes'];
     $chtext = $choice['chtext'];
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.159
diff -u -r1.159 profile.module
--- modules/profile/profile.module	10 Jul 2006 19:27:52 -0000	1.159
+++ modules/profile/profile.module	24 Jul 2006 02:14:00 -0000
@@ -633,6 +633,7 @@
     // Use LOWER('%s') instead of PHP's strtolower() to avoid UTF-8 conversion issues.
   }
 
+  $w = 0;
   while ($field = db_fetch_object($result)) {
     $category = $field->category;
     if (!isset($fields[$category])) {
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.184
diff -u -r1.184 search.module
--- modules/search/search.module	17 Jul 2006 13:15:22 -0000	1.184
+++ modules/search/search.module	24 Jul 2006 02:14:01 -0000
@@ -242,7 +242,7 @@
  * Menu callback: confirm wiping of the index.
  */
 function search_wipe_confirm() {
-  return confirm_form('search_wipe_confirm', $form, t('Are you sure you want to re-index the site?'),
+  return confirm_form('search_wipe_confirm', array(), t('Are you sure you want to re-index the site?'),
                   'admin/settings/search', t(' The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed. This action cannot be undone.'), t('Re-index site'), t('Cancel'));
 }
 
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.639
diff -u -r1.639 user.module
--- modules/user/user.module	18 Jul 2006 10:14:26 -0000	1.639
+++ modules/user/user.module	24 Jul 2006 02:14:03 -0000
@@ -1079,6 +1079,7 @@
           // Now we can set the new user.
           $user = $account;
           // And proceed with normal login, going to user page.
+          $edit = array();
           user_module_invoke('login', $edit, $user);
           drupal_set_message(t('You have just used your one-time login link. It is no longer necessary to use this link to login. Please change your password.'));
           drupal_goto('user/'. $user->uid .'/edit');
@@ -1144,7 +1145,10 @@
     // Redirect back to page which initiated the create request; usually admin/user/create
     $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']);
   }
-  $extra = _user_forms($null, $null, $null, 'register');
+  
+  // Create a dummy variable for pass-by-reference parameters.
+  $null = NULL;
+  $extra = _user_forms($null, NULL, NULL, 'register');
 
   // Remove form_group around default fields if there are no other groups.
   if (!$extra) {
