? sites/default/files
? sites/default/settings.php
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.219
diff -u -p -r1.219 locale.inc
--- includes/locale.inc	8 Jun 2009 05:00:11 -0000	1.219
+++ includes/locale.inc	28 Jun 2009 01:08:18 -0000
@@ -564,7 +564,8 @@ function locale_translate_seek_screen() 
   // Add CSS.
   drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css', array('preprocess' => FALSE));
 
-  $output = drupal_render(drupal_get_form('locale_translation_filter_form'));
+  $elements = drupal_get_form('locale_translation_filter_form');
+  $output = drupal_render($elements);
   $output .= _locale_translate_seek();
   return $output;
 }
@@ -804,9 +805,11 @@ function locale_translate_export_screen(
   $output = '';
   // Offer translation export if any language is set up.
   if (count($names)) {
-    $output = drupal_render(drupal_get_form('locale_translate_export_po_form', $names));
+    $elements = drupal_get_form('locale_translate_export_po_form', $names);
+    $output = drupal_render($elements);
   }
-  $output .= drupal_render(drupal_get_form('locale_translate_export_pot_form'));
+  $elements = drupal_get_form('locale_translate_export_pot_form');
+  $output .= drupal_render($elements);
   return $output;
 }
 
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.496
diff -u -p -r1.496 theme.inc
--- includes/theme.inc	18 Jun 2009 21:19:02 -0000	1.496
+++ includes/theme.inc	28 Jun 2009 01:08:19 -0000
@@ -1948,7 +1948,8 @@ function template_preprocess_page(&$vari
   $variables['messages']          = $variables['show_messages'] ? theme('status_messages') : '';
   $variables['main_menu']         = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
   $variables['secondary_menu']    = theme_get_setting('toggle_secondary_menu') ? menu_secondary_menu() : array();
-  $variables['search_box']        = (theme_get_setting('toggle_search') ? drupal_render(drupal_get_form('search_theme_form')) : '');
+  $elements = theme_get_setting('toggle_search') ? drupal_get_form('search_theme_form') : '';
+  $variables['search_box']        = (theme_get_setting('toggle_search') ? (drupal_render($elements)) : '');
   $variables['site_name']         = (theme_get_setting('toggle_name') ? filter_xss_admin(variable_get('site_name', 'Drupal')) : '');
   $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? filter_xss_admin(variable_get('site_slogan', '')) : '');
   $variables['tabs']              = theme('menu_local_tasks');
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.729
diff -u -p -r1.729 comment.module
--- modules/comment/comment.module	27 Jun 2009 10:13:28 -0000	1.729
+++ modules/comment/comment.module	28 Jun 2009 01:08:19 -0000
@@ -1685,7 +1685,8 @@ function comment_form(&$form_state, $edi
  *   A string containing the box output.
  */
 function theme_comment_form_box($edit, $title = NULL) {
-  $content = drupal_render(drupal_get_form('comment_form', $edit, $title));
+  $elements = drupal_get_form('comment_form', $edit, $title);
+  $content = drupal_render($elements);
   $output = '<h2 class="title">' . $title . '</h2><div>' . $content . '</div>';
   return $output;
 }
@@ -1752,7 +1753,8 @@ function comment_form_add_preview($form,
   }
   else {
     $suffix = empty($form['#suffix']) ? '' : $form['#suffix'];
-    $form['#suffix'] = $suffix . drupal_render(node_build($node));
+    $elements = node_build($node);
+    $form['#suffix'] = $suffix . drupal_render($elements);
     $edit['pid'] = 0;
   }
 
Index: modules/comment/comment.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.pages.inc,v
retrieving revision 1.20
diff -u -p -r1.20 comment.pages.inc
--- modules/comment/comment.pages.inc	8 Jun 2009 05:10:37 -0000	1.20
+++ modules/comment/comment.pages.inc	28 Jun 2009 01:08:19 -0000
@@ -93,7 +93,8 @@ function comment_reply($node, $pid = NUL
       }
       // This is the case where the comment is in response to a node. Display the node.
       elseif (user_access('access content')) {
-        $output .= drupal_render(node_build($node));
+        $elements = node_build($node);
+        $output .= drupal_render($elements);
       }
 
       // Should we show the reply box?
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1075
diff -u -p -r1.1075 node.module
--- modules/node/node.module	27 Jun 2009 18:19:41 -0000	1.1075
+++ modules/node/node.module	28 Jun 2009 01:08:19 -0000
@@ -3083,7 +3083,8 @@ function node_unpublish_by_keyword_actio
  */
 function node_unpublish_by_keyword_action($node, $context) {
   foreach ($context['keywords'] as $keyword) {
-    if (strpos(drupal_render(node_build(clone $node)), $keyword) !== FALSE || strpos($node->title, $keyword) !== FALSE) {
+    $elements = node_build(clone $node);
+    if (strpos(drupal_render($elements), $keyword) !== FALSE || strpos($node->title, $keyword) !== FALSE) {
       $node->status = 0;
       watchdog('action', 'Set @type %title to unpublished.', array('@type' => node_type_get_name($node), '%title' => $node->title));
       break;
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.70
diff -u -p -r1.70 node.pages.inc
--- modules/node/node.pages.inc	22 Jun 2009 09:10:05 -0000	1.70
+++ modules/node/node.pages.inc	28 Jun 2009 01:08:19 -0000
@@ -373,8 +373,10 @@ function theme_node_preview($node) {
 
   $preview_trimmed_version = FALSE;
 
-  $trimmed = drupal_render(node_build(clone $node, 'teaser'));
-  $full = drupal_render(node_build($node, 'full'));
+  $elements = node_build(clone $node, 'teaser');
+  $trimmed = drupal_render($elements);
+  $elements = node_build($node, 'full');
+  $full = drupal_render($elements);
 
   // Do we need to preview trimmed version of post as well as full version?
   if ($trimmed != $full) {
Index: modules/openid/openid.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.inc,v
retrieving revision 1.18
diff -u -p -r1.18 openid.inc
--- modules/openid/openid.inc	3 Jun 2009 19:27:21 -0000	1.18
+++ modules/openid/openid.inc	28 Jun 2009 01:08:20 -0000
@@ -73,7 +73,8 @@ function openid_redirect_http($url, $mes
  */
 function openid_redirect($url, $message) {
   $output = '<html><head><title>' . t('OpenID redirect') . "</title></head>\n<body>";
-  $output .= drupal_render(drupal_get_form('openid_redirect_form', $url, $message));
+  $elements = drupal_get_form('openid_redirect_form', $url, $message);
+  $output .= drupal_render($elements);
   $output .= '<script type="text/javascript">document.getElementById("openid-redirect-form").submit();</script>';
   $output .= "</body></html>\n";
   print $output;
Index: modules/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.50
diff -u -p -r1.50 openid.module
--- modules/openid/openid.module	10 Jun 2009 20:13:20 -0000	1.50
+++ modules/openid/openid.module	28 Jun 2009 01:08:20 -0000
@@ -439,7 +439,7 @@ function openid_authentication($response
     }
     else {
       unset($form_state['values']['response']);
-      $account = user_save('', $form_state['values']);
+      $account = user_save(new stdClass(), $form_state['values']);
       // Terminate if an error occurred during user_save().
       if (!$account) {
         drupal_set_message(t("Error saving user account."), 'error');
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.300
diff -u -p -r1.300 poll.module
--- modules/poll/poll.module	22 Jun 2009 09:10:06 -0000	1.300
+++ modules/poll/poll.module	28 Jun 2009 01:08:20 -0000
@@ -795,7 +795,8 @@ function theme_poll_choices($form) {
 function template_preprocess_poll_results(&$variables) {
   $variables['links'] = theme('links', $variables['raw_links']);
   if (isset($variables['vote']) && $variables['vote'] > -1 && user_access('cancel own vote')) {
-    $variables['cancel_form'] = drupal_render(drupal_get_form('poll_cancel_form', $variables['nid']));
+    $elements = drupal_get_form('poll_cancel_form', $variables['nid']);
+    $variables['cancel_form'] = drupal_render($elements);
   }
   $variables['title'] = check_plain($variables['raw_title']);
 
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.117
diff -u -p -r1.117 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	16 Jun 2009 04:43:47 -0000	1.117
+++ modules/simpletest/drupal_web_test_case.php	28 Jun 2009 01:08:20 -0000
@@ -811,7 +811,7 @@ class DrupalWebTestCase extends DrupalTe
     $edit['pass']   = user_password();
     $edit['status'] = 1;
 
-    $account = user_save('', $edit);
+    $account = user_save(new stdClass(), $edit);
 
     $this->assertTrue(!empty($account->uid), t('User created with name %name and pass %pass', array('%name' => $edit['name'], '%pass' => $edit['pass'])), t('User login'));
     if (empty($account->uid)) {
Index: modules/simpletest/tests/file.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/file.test,v
retrieving revision 1.32
diff -u -p -r1.32 file.test
--- modules/simpletest/tests/file.test	2 Jun 2009 13:42:40 -0000	1.32
+++ modules/simpletest/tests/file.test	28 Jun 2009 01:08:20 -0000
@@ -280,17 +280,20 @@ class FileSpaceUsedTest extends FileTest
   function setUp() {
     parent::setUp();
 
-    // Create records for a couple of users with different sizes.
-    drupal_write_record('files', $file = array('uid' => 2, 'filesize' => 50, 'status' => FILE_STATUS_PERMANENT));
-    drupal_write_record('files', $file = array('uid' => 2, 'filesize' => 20, 'status' => FILE_STATUS_PERMANENT));
-    drupal_write_record('files', $file = array('uid' => 3, 'filesize' => 100, 'status' => FILE_STATUS_PERMANENT));
-    drupal_write_record('files', $file = array('uid' => 3, 'filesize' => 200, 'status' => FILE_STATUS_PERMANENT));
-
-    // Now create some with other statuses. These values were chosen arbitrarily
-    // for the sole purpose of testing that bitwise operators were used
-    // correctly on the field.
-    drupal_write_record('files', $file = array('uid' => 2, 'filesize' => 1, 'status' => 2 | 8));
-    drupal_write_record('files', $file = array('uid' => 3, 'filesize' => 3, 'status' => 2 | 4));
+    // Create records for a couple of users with different sizes and statuses.
+    // The status values were chosen arbitrarily for the sole purpose of
+    // testing that bitwise operators were used correctly on the field.
+    $files = array(
+      array('uid' => 2, 'filesize' => 50, 'status' => FILE_STATUS_PERMANENT),
+      array('uid' => 2, 'filesize' => 20, 'status' => FILE_STATUS_PERMANENT),
+      array('uid' => 3, 'filesize' => 100, 'status' => FILE_STATUS_PERMANENT),
+      array('uid' => 3, 'filesize' => 200, 'status' => FILE_STATUS_PERMANENT),
+      array('uid' => 2, 'filesize' => 1, 'status' => 2 | 8),
+      array('uid' => 3, 'filesize' => 3, 'status' => 2 | 4),
+    );
+    foreach ($files as $file) {
+      drupal_write_record('files', $file );
+    }
   }
 
   /**
@@ -1592,7 +1595,7 @@ class FileLoadTest extends FileHookTestC
    * Try to load a non-existent file by filepath.
    */
   function testLoadMissingFilepath() {
-    $this->assertFalse(reset(file_load_multiple(array(), array('filepath' => 'misc/druplicon.png'))), t("Try to load a file that doesn't exist in the database fails."));
+    $this->assertFalse(file_load_multiple(array(), array('filepath' => 'misc/druplicon.png')), t("Try to load a file that doesn't exist in the database fails."));
     $this->assertFileHooksCalled(array());
   }
 
@@ -1600,7 +1603,7 @@ class FileLoadTest extends FileHookTestC
    * Try to load a non-existent file by status.
    */
   function testLoadInvalidStatus() {
-    $this->assertFalse(reset(file_load_multiple(array(), array('status' => -99))), t("Trying to load a file with an invalid status fails."));
+    $this->assertFalse(file_load_multiple(array(), array('status' => -99)), t("Trying to load a file with an invalid status fails."));
     $this->assertFileHooksCalled(array());
   }
 
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.481
diff -u -p -r1.481 taxonomy.module
--- modules/taxonomy/taxonomy.module	27 Jun 2009 19:49:07 -0000	1.481
+++ modules/taxonomy/taxonomy.module	28 Jun 2009 01:08:20 -0000
@@ -1325,7 +1325,8 @@ function taxonomy_vocabulary_load_multip
  *   Results are statically cached.
  */
 function taxonomy_vocabulary_load($vid) {
-  return reset(taxonomy_vocabulary_load_multiple(array($vid), array()));
+  $vocabularies = taxonomy_vocabulary_load_multiple(array($vid), array());
+  return reset($vocabularies);
 }
 
 /**
Index: modules/taxonomy/taxonomy.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.test,v
retrieving revision 1.38
diff -u -p -r1.38 taxonomy.test
--- modules/taxonomy/taxonomy.test	27 Jun 2009 19:49:07 -0000	1.38
+++ modules/taxonomy/taxonomy.test	28 Jun 2009 01:08:21 -0000
@@ -542,7 +542,8 @@ class TaxonomyTermTestCase extends Taxon
     // Create the term to edit.
     $this->drupalPost('admin/build/taxonomy/' . $this->vocabulary->vid . '/add', $edit, t('Save'));
 
-    $term = reset(taxonomy_get_term_by_name($edit['name']));
+    $terms = taxonomy_get_term_by_name($edit['name']);
+    $term = reset($terms);
     $this->assertNotNull($term, t('Term found in database'));
 
     // Submitting a term takes us to the add page; we need the List page.
@@ -708,7 +709,8 @@ class TaxonomyHooksTestCase extends Taxo
       'antonyms' => 'Long',
     );
     $this->drupalPost('admin/build/taxonomy/' . $vocabulary->vid . '/add', $edit, t('Save'));
-    $term = reset(taxonomy_get_term_by_name($edit['name']));
+    $terms = taxonomy_get_term_by_name($edit['name']);
+    $term = reset($terms);
     $this->assertEqual($term->antonyms[0], $edit['antonyms'], t('Antonyms were loaded into the term object'));
 
     // Update the term with a different antonym.
Index: modules/upload/upload.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.test,v
retrieving revision 1.20
diff -u -p -r1.20 upload.test
--- modules/upload/upload.test	22 Jun 2009 09:10:06 -0000	1.20
+++ modules/upload/upload.test	28 Jun 2009 01:08:21 -0000
@@ -64,7 +64,8 @@ class UploadTestCase extends DrupalWebTe
 
     // Assure that the attachment link appears on teaser view and has correct count.
     $node = node_load($node->nid);
-    $teaser = drupal_render(node_build($node, 'teaser'));
+    $elements = node_build($node, 'teaser');
+    $teaser = drupal_render($elements);
     $this->assertTrue(strpos($teaser, format_plural(2, '1 attachment', '@count attachments')), 'Attachments link found on node teaser.');
 
     // Fetch db record and use fid to rename and delete file.
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1002
diff -u -p -r1.1002 user.module
--- modules/user/user.module	22 Jun 2009 09:10:07 -0000	1.1002
+++ modules/user/user.module	28 Jun 2009 01:08:21 -0000
@@ -138,7 +138,8 @@ function user_external_load($authname) {
  *    TRUE if the login succeeds, FALSE otherwise.
  */
 function user_external_login($account, $edit = array()) {
-  $form = drupal_render(drupal_get_form('user_login'));
+  $elements = drupal_get_form('user_login');
+  $form = drupal_render($elements);
 
   $state['values'] = $edit;
   if (empty($state['values']['name'])) {
@@ -1761,7 +1762,7 @@ function user_external_login_register($n
       'status' => 1,
       'access' => REQUEST_TIME
     );
-    $account = user_save('', $userinfo);
+    $account = user_save(new stdClass(), $userinfo);
     // Terminate if an error occurred during user_save().
     if (!$account) {
       drupal_set_message(t("Error saving user account."), 'error');
@@ -2798,7 +2799,7 @@ function user_register_submit($form, &$f
     // Set the user's status because it was not displayed in the form.
     $merge_data['status'] = variable_get('user_register', 1) == 1;
   }
-  $account = user_save('', array_merge($form_state['values'], $merge_data));
+  $account = user_save(new stdClass(), array_merge($form_state['values'], $merge_data));
   // Terminate if an error occurred during user_save().
   if (!$account) {
     drupal_set_message(t("Error saving user account."), 'error');
Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.43
diff -u -p -r1.43 user.test
--- modules/user/user.test	13 Jun 2009 20:40:09 -0000	1.43
+++ modules/user/user.test	28 Jun 2009 01:08:21 -0000
@@ -159,7 +159,7 @@ class UserValidationTestCase extends Dru
   }
 }
 
-class UserCancelTestCase extends DrupalWebTestCase {
+class UserCancelTestCase extends CommentHelperCase {
   public static function getInfo() {
     return array(
       'name' => t('Cancel account'),
@@ -233,7 +233,8 @@ class UserCancelTestCase extends DrupalW
     $bogus_timestamp = $timestamp - 86400 - 60;
     $this->drupalGet("user/$account->uid/cancel/confirm/$bogus_timestamp/" . user_pass_rehash($account->pass, $bogus_timestamp, $account->login));
     $this->assertText(t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'), t('Expired cancel account request rejected.'));
-    $this->assertTrue(reset(user_load_multiple(array($account->uid), array('status' => 1))), t('User account was not canceled.'));
+    $users = user_load_multiple(array($account->uid), array('status' => 1));
+    $this->assertTrue(reset($users), t('User account was not canceled.'));
 
     // Confirm user's content has not been altered.
     $test_node = node_load($node->nid, NULL, TRUE);
@@ -387,7 +388,7 @@ class UserCancelTestCase extends DrupalW
 
     // Create comment.
     module_load_include('test', 'comment');
-    $comment = CommentHelperCase::postComment($node, '', $this->randomName(32), TRUE, TRUE);
+    $comment = $this->postComment($node, '', $this->randomName(32), TRUE, TRUE);
     $this->assertTrue(comment_load($comment->id), t('Comment found.'));
 
     // Create a node with two revisions, the initial one belonging to the
@@ -585,7 +586,8 @@ class UserPictureTestCase extends Drupal
 
         // Images are sorted first by size then by name. We need an image
         // bigger than 1 KB so we'll grab the last one.
-        $image = end($this->drupalGetTestFiles('image'));
+        $images = $this->drupalGetTestFiles('image');
+        $image = end($images);
         $info = image_get_info($image->filepath);
 
         // Set new variables: valid dimensions, invalid filesize.
@@ -1056,7 +1058,7 @@ class UserSaveTestCase extends DrupalWeb
       'pass' => user_password(),
       'status' => 1,
     );
-    $user_by_return = user_save('', $user);
+    $user_by_return = user_save(new stdClass(), $user);
     $this->assertTrue($user_by_return, t('Loading user by return of user_save().'));
 
     // Test if created user exists.
