? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.202
diff -u -p -r1.202 install.php
--- install.php	25 Aug 2009 21:53:46 -0000	1.202
+++ install.php	9 Sep 2009 20:52:58 -0000
@@ -1027,7 +1027,8 @@ function install_select_profile(&$instal
       if ($install_state['interactive']) {
         include_once DRUPAL_ROOT . '/includes/form.inc';
         drupal_set_title(st('Select an installation profile'));
-        return drupal_render(drupal_get_form('install_select_profile_form', $install_state['profiles']));
+        $elements = drupal_get_form('install_select_profile_form', $install_state['profiles']);
+        return drupal_render($elements);
       }
       else {
         throw new Exception(install_no_profile_error());
@@ -1196,7 +1197,8 @@ function install_select_locale(&$install
       if ($install_state['interactive']) {
         drupal_set_title(st('Choose language'));
         include_once DRUPAL_ROOT . '/includes/form.inc';
-        return drupal_render(drupal_get_form('install_select_locale_form', $locales));
+        $elements = drupal_get_form('install_select_locale_form', $locales);
+        return drupal_render($elements);
       }
       else {
         throw new Exception(st('Sorry, you must select a language to continue the installation.'));
Index: update.php
===================================================================
RCS file: /cvs/drupal/drupal/update.php,v
retrieving revision 1.302
diff -u -p -r1.302 update.php
--- update.php	7 Sep 2009 15:43:54 -0000	1.302
+++ update.php	9 Sep 2009 20:52:58 -0000
@@ -28,7 +28,8 @@ define('MAINTENANCE_MODE', 'update');
 
 function update_selection_page() {
   drupal_set_title('Drupal database update');
-  $output = drupal_render(drupal_get_form('update_script_selection_form'));
+  $elements = drupal_get_form('update_script_selection_form');
+  $output = drupal_render($elements);
 
   update_task_list('select');
 
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.226
diff -u -p -r1.226 locale.inc
--- includes/locale.inc	22 Aug 2009 14:34:17 -0000	1.226
+++ includes/locale.inc	9 Sep 2009 20:52:59 -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.519
diff -u -p -r1.519 theme.inc
--- includes/theme.inc	31 Aug 2009 19:50:17 -0000	1.519
+++ includes/theme.inc	9 Sep 2009 20:53:00 -0000
@@ -2074,7 +2074,8 @@ function template_preprocess_page(&$vari
   $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['action_links']      = menu_local_actions();
-  $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') : array();
+  $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: includes/filetransfer/filetransfer.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/filetransfer/filetransfer.inc,v
retrieving revision 1.4
diff -u -p -r1.4 filetransfer.inc
--- includes/filetransfer/filetransfer.inc	28 Aug 2009 07:51:55 -0000	1.4
+++ includes/filetransfer/filetransfer.inc	9 Sep 2009 20:53:01 -0000
@@ -24,7 +24,8 @@ abstract class FileTransfer {
     $this->jail = $jail;
   }
 
-  abstract static function factory($jail, $settings);
+  static function factory($jail, $settings) {
+  }
 
   /**
    * Implementation of the magic __get() method. If the connection isn't set to
Index: modules/file/tests/file.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/file/tests/file.test,v
retrieving revision 1.1
diff -u -p -r1.1 file.test
--- modules/file/tests/file.test	29 Aug 2009 12:52:32 -0000	1.1
+++ modules/file/tests/file.test	9 Sep 2009 20:53:01 -0000
@@ -176,7 +176,7 @@ class FileFieldTestCase extends DrupalWe
  * Test class to test file handling with node revisions.
  */
 class FileFieldRevisionTestCase extends FileFieldTestCase {
-  public function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => t('File field revision test'),
       'description' => t('Test creating and deleting revisions with files attached.'),
@@ -269,7 +269,7 @@ class FileFieldRevisionTestCase extends 
  * Test class to check that formatters are working properly.
  */
 class FileFieldDisplayTestCase extends FileFieldTestCase {
-  public function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => t('File field display tests'),
       'description' => t('Test the display of file fields in node and views.'),
@@ -323,7 +323,7 @@ class FileFieldValidateTestCase extends 
   protected $field;
   protected $node_type;
 
-  public function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => t('File field validation tests'),
       'description' => t('Tests validation functions such as file type, max file size, max size per node, and required.'),
@@ -478,7 +478,7 @@ class FileFieldValidateTestCase extends 
  * Test class to check that files are uploaded to proper locations.
  */
 class FileFieldPathTestCase extends FileFieldTestCase {
-  function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => t('File field file path tests'),
       'description' => t('Test that files are uploaded to the proper location with token support.'),
Index: modules/image/image.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.test,v
retrieving revision 1.8
diff -u -p -r1.8 image.test
--- modules/image/image.test	26 Aug 2009 03:20:39 -0000	1.8
+++ modules/image/image.test	9 Sep 2009 20:53:01 -0000
@@ -51,11 +51,13 @@ class ImageStylesPathAndUrlUnitTest exte
     image_style_save(array('name' => $this->style_name));
 
     // Create the directories for the styles.
-    $status = file_prepare_directory($d = file_directory_path() . '/styles/' . $this->style_name, FILE_CREATE_DIRECTORY);
+    $d = file_directory_path() . '/styles/' . $this->style_name;
+    $status = file_prepare_directory($d, FILE_CREATE_DIRECTORY);
     $this->assertNotIdentical(FALSE, $status, t('Created the directory for the generated images for the test style.' ));
 
     // Create a working copy of the file.
-    $file = reset($this->drupalGetTestFiles('image'));
+    $files = $this->drupalGetTestFiles('image');
+    $file = reset($files);
     $this->image_info = image_get_info($file->uri);
     $this->image_filepath = file_unmanaged_copy($file->uri, NULL, FILE_EXISTS_RENAME);
     $this->assertNotIdentical(FALSE, $this->image_filepath, t('Created the without generated image file.'));
@@ -234,7 +236,7 @@ class ImageEffectsUnitTest extends Image
  */
 class ImageAdminStylesUnitTest extends DrupalWebTestCase {
 
-  function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => 'Image styles and effects UI configuration',
       'description' => 'Tests creation, deletion, and editing of image styles and effects at the UI level.',
@@ -262,7 +264,8 @@ class ImageAdminStylesUnitTest extends D
     // First, we need to make sure we have an image in our testing
     // file directory. Copy over an image on the first run.
     if (!isset($file_path)) {
-      $file = reset($this->drupalGetTestFiles('image'));
+      $files = $this->drupalGetTestFiles('image');
+      $file = reset($files);
       $file_path = file_unmanaged_copy($file->uri);
     }
 
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1119
diff -u -p -r1.1119 node.module
--- modules/node/node.module	5 Sep 2009 06:53:01 -0000	1.1119
+++ modules/node/node.module	9 Sep 2009 20:53:01 -0000
@@ -3090,7 +3090,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 = NODE_NOT_PUBLISHED;
       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.79
diff -u -p -r1.79 node.pages.inc
--- modules/node/node.pages.inc	5 Sep 2009 15:05:03 -0000	1.79
+++ modules/node/node.pages.inc	9 Sep 2009 20:53:01 -0000
@@ -384,8 +384,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	9 Sep 2009 20:53:02 -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/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.311
diff -u -p -r1.311 poll.module
--- modules/poll/poll.module	29 Aug 2009 05:46:03 -0000	1.311
+++ modules/poll/poll.module	9 Sep 2009 20:53:02 -0000
@@ -804,7 +804,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/tests/file.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/file.test,v
retrieving revision 1.43
diff -u -p -r1.43 file.test
--- modules/simpletest/tests/file.test	31 Aug 2009 05:47:34 -0000	1.43
+++ modules/simpletest/tests/file.test	9 Sep 2009 20:53:03 -0000
@@ -287,17 +287,20 @@ class FileSpaceUsedTest extends FileTest
   function setUp() {
     parent::setUp();
 
-    // Create records for a couple of users with different sizes.
-    drupal_write_record('file', $file = array('uid' => 2, 'uri' => 'public://example1.txt', 'filesize' => 50, 'status' => FILE_STATUS_PERMANENT));
-    drupal_write_record('file', $file = array('uid' => 2, 'uri' => 'public://example2.txt', 'filesize' => 20, 'status' => FILE_STATUS_PERMANENT));
-    drupal_write_record('file', $file = array('uid' => 3, 'uri' => 'public://example3.txt', 'filesize' => 100, 'status' => FILE_STATUS_PERMANENT));
-    drupal_write_record('file', $file = array('uid' => 3, 'uri' => 'public://example4.txt', '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('file', $file = array('uid' => 2, 'uri' => 'public://example5.txt', 'filesize' => 1, 'status' => 2 | 8));
-    drupal_write_record('file', $file = array('uid' => 3, 'uri' => 'public://example6.txt', '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, 'uri' => 'public://example1.txt', 'filesize' => 50, 'status' => FILE_STATUS_PERMANENT),
+      array('uid' => 2, 'uri' => 'public://example2.txt', 'filesize' => 20, 'status' => FILE_STATUS_PERMANENT),
+      array('uid' => 3, 'uri' => 'public://example3.txt', 'filesize' => 100, 'status' => FILE_STATUS_PERMANENT),
+      array('uid' => 3, 'uri' => 'public://example4.txt', 'filesize' => 200, 'status' => FILE_STATUS_PERMANENT),
+      array('uid' => 2, 'uri' => 'public://example5.txt', 'filesize' => 1, 'status' => 2 | 8),
+      array('uid' => 3, 'uri' => 'public://example6.txt', 'filesize' => 3, 'status' => 2 | 4),
+    );
+    foreach ($files as $file) {
+      drupal_write_record('file', $file);
+    }
   }
 
   /**
@@ -1582,7 +1585,8 @@ class FileLoadTest extends FileHookTestC
    * Try to load a non-existent file by URI.
    */
   function testLoadMissingFilepath() {
-    $this->assertFalse(reset(file_load_multiple(array(), array('uri' => 'foobar://misc/druplicon.png'))), t("Try to load a file that doesn't exist in the database fails."));
+    $files = file_load_multiple(array(), array('uri' => 'foobar://misc/druplicon.png'));
+    $this->assertFalse(reset($files), t("Try to load a file that doesn't exist in the database fails."));
     $this->assertFileHooksCalled(array());
   }
 
@@ -1590,7 +1594,8 @@ 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."));
+    $files = file_load_multiple(array(), array('status' => -99));
+    $this->assertFalse(reset($files), t("Trying to load a file with an invalid status fails."));
     $this->assertFileHooksCalled(array());
   }
 
Index: modules/simpletest/tests/mail.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/mail.test,v
retrieving revision 1.1
diff -u -p -r1.1 mail.test
--- modules/simpletest/tests/mail.test	31 Aug 2009 18:30:26 -0000	1.1
+++ modules/simpletest/tests/mail.test	9 Sep 2009 20:53:03 -0000
@@ -13,7 +13,7 @@ class MailTestCase extends DrupalWebTest
    */
   private static $sent_message;
 
-  function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => 'Mail system',
       'description' => 'Performs tests on the pluggable mailing framework.',
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.785
diff -u -p -r1.785 system.module
--- modules/system/system.module	5 Sep 2009 15:05:04 -0000	1.785
+++ modules/system/system.module	9 Sep 2009 20:53:04 -0000
@@ -1871,6 +1871,7 @@ function _system_get_module_data() {
 
   // Include the install profile in modules that are loaded.
   $profile = drupal_get_profile();
+  $modules[$profile] = (object) array();
   $modules[$profile]->name = $profile;
   $modules[$profile]->uri = 'profiles/' . $profile . '/' . $profile . '.profile';
   $modules[$profile]->filename = $profile . '.profile';
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.508
diff -u -p -r1.508 taxonomy.module
--- modules/taxonomy/taxonomy.module	9 Sep 2009 11:28:57 -0000	1.508
+++ modules/taxonomy/taxonomy.module	9 Sep 2009 20:53:05 -0000
@@ -1264,7 +1264,7 @@ class TaxonomyTermController extends Dru
     }
   }
 
-  protected function cacheGet($ids) {
+  protected function cacheGet($ids, $conditions = array()) {
     $terms = parent::cacheGet($ids);
     // Name matching is case insensitive, note that with some collations
     // LOWER() and drupal_strtolower() may return different results.
@@ -1379,7 +1379,8 @@ function taxonomy_vocabulary_load_multip
  *   Results are statically cached.
  */
 function taxonomy_vocabulary_load($vid) {
-  return reset(taxonomy_vocabulary_load_multiple(array($vid)));
+  $vocabularies = taxonomy_vocabulary_load_multiple(array($vid));
+  return reset($vocabularies);
 }
 
 /**
Index: modules/taxonomy/taxonomy.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.test,v
retrieving revision 1.46
diff -u -p -r1.46 taxonomy.test
--- modules/taxonomy/taxonomy.test	25 Aug 2009 21:53:48 -0000	1.46
+++ modules/taxonomy/taxonomy.test	9 Sep 2009 20:53:05 -0000
@@ -519,7 +519,8 @@ class TaxonomyTermTestCase extends Taxon
     // Create the term to edit.
     $this->drupalPost('admin/structure/taxonomy/' . $this->vocabulary->vid . '/list/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.
@@ -685,7 +686,8 @@ class TaxonomyHooksTestCase extends Taxo
       'antonym' => 'Long',
     );
     $this->drupalPost('admin/structure/taxonomy/' . $vocabulary->vid . '/list/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->antonym, $edit['antonym'], t('Antonym was loaded into the term object'));
 
     // Update the term with a different antonym.
Index: modules/trigger/trigger.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.module,v
retrieving revision 1.47
diff -u -p -r1.47 trigger.module
--- modules/trigger/trigger.module	1 Sep 2009 16:50:12 -0000	1.47
+++ modules/trigger/trigger.module	9 Sep 2009 20:53:05 -0000
@@ -390,7 +390,8 @@ function trigger_user_login(&$edit, $acc
  * Implement hook_user_logout().
  */
 function trigger_user_logout($account) {
-  _trigger_user('logout', $edit = NULL, $account);
+  $edit = NULL;
+  _trigger_user('logout', $edit, $account);
 }
 
 /**
@@ -423,7 +424,8 @@ function trigger_user_cancel($edit, $acc
  * Implement hook_user_view().
  */
 function trigger_user_view($account) {
-  _trigger_user('view', $edit = NULL, $account, NULL);
+  $edit = NULL;
+  _trigger_user('view', $edit, $account, NULL);
 }
 
 /**
Index: modules/upload/upload.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.test,v
retrieving revision 1.26
diff -u -p -r1.26 upload.test
--- modules/upload/upload.test	31 Aug 2009 05:47:34 -0000	1.26
+++ modules/upload/upload.test	9 Sep 2009 20:53:05 -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.1040
diff -u -p -r1.1040 user.module
--- modules/user/user.module	9 Sep 2009 11:27:00 -0000	1.1040
+++ modules/user/user.module	9 Sep 2009 20:53:06 -0000
@@ -337,6 +337,9 @@ function user_save($account, $edit = arr
 
   $edit = (array) $edit;
 
+  if (empty($account)) {
+    $account = new stdClass();
+  }
   if (!isset($account->is_new)) {
     $account->is_new = empty($account->uid);
   }
Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.60
diff -u -p -r1.60 user.test
--- modules/user/user.test	9 Sep 2009 11:36:02 -0000	1.60
+++ modules/user/user.test	9 Sep 2009 20:53:06 -0000
@@ -297,7 +297,7 @@ class UserLoginTestCase extends DrupalWe
   }
 }
 
-class UserCancelTestCase extends DrupalWebTestCase {
+class UserCancelTestCase extends CommentHelperCase {
   public static function getInfo() {
     return array(
       'name' => 'Cancel account',
@@ -371,7 +371,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);
@@ -525,7 +526,7 @@ class UserCancelTestCase extends DrupalW
 
     // Create comment.
     module_load_include('test', 'comment');
-    $comment = CommentHelperCase::postComment($node, '', $this->randomName(32), FALSE, TRUE);
+    $comment = $this->postComment($node, '', $this->randomName(32), FALSE, TRUE);
     $this->assertTrue(comment_load($comment->id), t('Comment found.'));
 
     // Create a node with two revisions, the initial one belonging to the
@@ -725,7 +726,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->uri);
 
         // Set new variables: valid dimensions, invalid filesize.
