Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1061
diff -u -p -r1.1061 common.inc
--- includes/common.inc	7 Dec 2009 08:46:59 -0000	1.1061
+++ includes/common.inc	9 Dec 2009 23:22:09 -0000
@@ -807,20 +807,16 @@ function drupal_http_request($url, array
 
   $result = new stdClass();
 
-  // Parse the URL and make sure we can handle the schema.
-  $uri = @parse_url($url);
-
-  if ($uri == FALSE) {
+  // Validate the passed URL. FILTER_VALIDATE_URL uses parse_url() internally,
+  // but unlike parse_url() itself, it will not throw a run-time notice for
+  // bogus URLs.
+  if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
     $result->error = 'unable to parse URL';
     $result->code = -1001;
     return $result;
   }
 
-  if (!isset($uri['scheme'])) {
-    $result->error = 'missing schema';
-    $result->code = -1002;
-    return $result;
-  }
+  $uri = parse_url($url);
 
   timer_start(__FUNCTION__);
 
Index: includes/stream_wrappers.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/stream_wrappers.inc,v
retrieving revision 1.6
diff -u -p -r1.6 stream_wrappers.inc
--- includes/stream_wrappers.inc	31 Aug 2009 05:47:33 -0000	1.6
+++ includes/stream_wrappers.inc	9 Dec 2009 20:21:07 -0000
@@ -500,7 +500,12 @@ abstract class DrupalLocalStreamWrapper 
   public function url_stat($uri, $flags) {
     $this->uri = $uri;
     if ($flags & STREAM_URL_STAT_QUIET) {
-      return @stat($this->getLocalPath());
+      if (file_exists($this->getLocalPath())) {
+        return stat($this->getLocalPath());
+      }
+      else {
+        return FALSE;
+      }
     }
     else {
       return stat($this->getLocalPath());
Index: modules/comment/comment.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.test,v
retrieving revision 1.55
diff -u -p -r1.55 comment.test
--- modules/comment/comment.test	8 Dec 2009 06:33:11 -0000	1.55
+++ modules/comment/comment.test	9 Dec 2009 23:08:20 -0000
@@ -21,8 +21,11 @@ class CommentHelperCase extends DrupalWe
    * @param string $comment Comment body.
    * @param string $subject Comment subject.
    * @param mixed $contact Set to NULL for no contact info, TRUE to ignore success checking, and array of values to set contact info.
+   *
+   * This needs to be static to be invoked via CommentHelperCase::postComment()
+   * in other tests.
    */
-  function postComment($node, $comment, $subject = '', $contact = NULL) {
+  public static function postComment($node, $comment, $subject = '', $contact = NULL) {
     $edit = array();
     $edit['comment'] = $comment;
 
Index: modules/field/modules/field_sql_storage/field_sql_storage.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/field_sql_storage/field_sql_storage.module,v
retrieving revision 1.33
diff -u -p -r1.33 field_sql_storage.module
--- modules/field/modules/field_sql_storage/field_sql_storage.module	4 Dec 2009 16:49:46 -0000	1.33
+++ modules/field/modules/field_sql_storage/field_sql_storage.module	9 Dec 2009 20:21:09 -0000
@@ -487,7 +487,11 @@ function field_sql_storage_field_storage
   foreach ($conditions as $condition) {
     // A condition is either a (column, value, operator) triple, or a
     // (column, value) pair with implied operator.
-    @list($column, $value, $operator) = $condition;
+    list($column, $value) = $condition;
+    $operator = NULL;
+    if (isset($condition[2])) {
+      $operator = $condition[2];
+    }
     // Translate operator and value if needed.
     switch ($operator) {
       case 'STARTS_WITH':
Index: modules/field/modules/list/list.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/list/list.test,v
retrieving revision 1.5
diff -u -p -r1.5 list.test
--- modules/field/modules/list/list.test	2 Dec 2009 19:26:21 -0000	1.5
+++ modules/field/modules/list/list.test	9 Dec 2009 23:00:15 -0000
@@ -91,32 +91,28 @@ class ListFieldTestCase extends DrupalWe
 /**
 * List module UI tests.
 */
-class ListFieldUITestCase extends DrupalWebTestCase {
-    public static function getInfo() {
+class ListFieldUITestCase extends FieldUITestCase {
+  public static function getInfo() {
     return array(
       'name' => 'List field UI tests',
       'description' => 'Test the List field UI functionality.',
       'group' => 'Field types',
     );
   }
-  
-  function setUp() {
-    FieldUITestCase::setUp();
-  }
-   
+
   /**
    * Tests that allowed values are properly validated in the UI.
    */
   function testAllowedValues() {
     $element_name = "field[settings][allowed_values]";
-    
+
     //Test 'List' field type.
     $admin_path = $this->createListFieldAndEdit('list');
     //Check that non-integer keys are rejected.
     $edit = array($element_name => "1.1|one\n");
     $this->drupalPost($admin_path, $edit, t('Save settings'));
     $this->assertText("keys must be integers", t('Form vaildation failed.'));
-    
+
     // Test 'List (number)' field type.
     $admin_path = $this->createListFieldAndEdit('list_number');
     //Check that non-numeric keys are rejected.
Index: modules/field/tests/field.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/tests/field.test,v
retrieving revision 1.5
diff -u -p -r1.5 field.test
--- modules/field/tests/field.test	2 Dec 2009 19:26:22 -0000	1.5
+++ modules/field/tests/field.test	9 Dec 2009 21:32:48 -0000
@@ -17,8 +17,9 @@ class FieldTestCase extends DrupalWebTes
    */
   function setUp() {
     // Call parent::setUp().
+    // @see http://www.php.net/manual/en/function.call-user-func-array.php#73105
     $args = func_get_args();
-    call_user_func_array(array('parent', 'setUp'), $args);
+    call_user_func_array(array($this, 'parent::setUp'), $args);
     // Set default storage backend.
     variable_set('field_storage_default', $this->default_storage);
   }
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.309
diff -u -p -r1.309 filter.module
--- modules/filter/filter.module	8 Dec 2009 06:58:41 -0000	1.309
+++ modules/filter/filter.module	9 Dec 2009 22:18:55 -0000
@@ -468,7 +468,8 @@ function filter_default_format($account 
   }
   // Get a list of formats for this user, ordered by weight. The first one
   // available is the user's default format.
-  $format = array_shift(filter_formats($account));
+  $formats = filter_formats($account);
+  $format = reset($formats);
   return $format->format;
 }
 
@@ -825,10 +826,12 @@ function _filter_tips($format_id, $long 
  *   A DOMDocument that represents the loaded (X)HTML snippet.
  */
 function filter_dom_load($text) {
-  // Ignore warnings during HTML soup loading.
-  $dom_document = @DOMDocument::loadHTML('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>' . $text . '</body></html>');
+  // Suppress all libxml warnings during loading of HTML.
+  libxml_use_internal_errors(TRUE);
+  $document = new DOMDocument();
+  $document->loadHTML('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>' . $text . '</body></html>');
 
-  return $dom_document;
+  return $document;
 }
 
 /**
Index: modules/image/image.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.test,v
retrieving revision 1.12
diff -u -p -r1.12 image.test
--- modules/image/image.test	10 Nov 2009 17:27:53 -0000	1.12
+++ modules/image/image.test	9 Dec 2009 22:05:07 -0000
@@ -84,14 +84,17 @@ class ImageStylesPathAndUrlUnitTest exte
     // Make the default scheme neither "public" nor "private" to verify the
     // functions work for other than the default scheme.
     variable_set('file_default_scheme', 'temporary');
-    file_prepare_directory($d = 'temporary://', FILE_CREATE_DIRECTORY);
+    $d = 'temporary://';
+    file_prepare_directory($d, FILE_CREATE_DIRECTORY);
 
     // Create the directories for the styles.
-    $status = file_prepare_directory($d = $scheme . '://styles/' . $this->style_name, FILE_CREATE_DIRECTORY);
+    $d = $scheme . '://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);
     $image_info = image_get_info($file->uri);
     $original_uri = file_unmanaged_copy($file->uri, $scheme . '://', FILE_EXISTS_RENAME);
     $this->assertNotIdentical(FALSE, $original_uri, t('Created the generated image file.'));
@@ -273,7 +276,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/locale/locale.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.install,v
retrieving revision 1.53
diff -u -p -r1.53 locale.install
--- modules/locale/locale.install	4 Dec 2009 16:49:46 -0000	1.53
+++ modules/locale/locale.install	9 Dec 2009 23:39:40 -0000
@@ -100,7 +100,9 @@ function locale_uninstall() {
     }
   }
   // Delete the JavaScript translations directory if empty.
-  @rmdir($locale_js_directory);
+  if (!file_scan_directory($locale_js_directory, '/.*/')) {
+    rmdir($locale_js_directory);
+  }
 
   // Clear variables.
   variable_del('language_default');
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.177
diff -u -p -r1.177 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	6 Dec 2009 18:06:22 -0000	1.177
+++ modules/simpletest/drupal_web_test_case.php	9 Dec 2009 22:18:32 -0000
@@ -424,29 +424,26 @@ abstract class DrupalTestCase {
   }
 
   /**
-   * Handle errors.
+   * Handle errors during test runs.
    *
    * Because this is registered in set_error_handler(), it has to be public.
    * @see set_error_handler
-   *
    */
   public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
-    if ($severity & error_reporting()) {
-      $error_map = array(
-        E_STRICT => 'Run-time notice',
-        E_WARNING => 'Warning',
-        E_NOTICE => 'Notice',
-        E_CORE_ERROR => 'Core error',
-        E_CORE_WARNING => 'Core warning',
-        E_USER_ERROR => 'User error',
-        E_USER_WARNING => 'User warning',
-        E_USER_NOTICE => 'User notice',
-        E_RECOVERABLE_ERROR => 'Recoverable error',
-      );
+    $error_map = array(
+      E_STRICT => 'Run-time notice',
+      E_WARNING => 'Warning',
+      E_NOTICE => 'Notice',
+      E_CORE_ERROR => 'Core error',
+      E_CORE_WARNING => 'Core warning',
+      E_USER_ERROR => 'User error',
+      E_USER_WARNING => 'User warning',
+      E_USER_NOTICE => 'User notice',
+      E_RECOVERABLE_ERROR => 'Recoverable error',
+    );
 
-      $backtrace = debug_backtrace();
-      $this->error($message, $error_map[$severity], _drupal_get_last_caller($backtrace));
-    }
+    $backtrace = debug_backtrace();
+    $this->error($message, $error_map[$severity], _drupal_get_last_caller($backtrace));
     return TRUE;
   }
 
@@ -532,13 +529,18 @@ class DrupalUnitTestCase extends DrupalT
     $this->skipClasses[__CLASS__] = TRUE;
   }
 
-  function setUp() {
+  protected function setUp() {
     global $db_prefix, $conf;
 
     // Store necessary current values before switching to prefixed database.
     $this->originalPrefix = $db_prefix;
     $this->originalFileDirectory = file_directory_path();
 
+    // Log fatal errors.
+    ini_set('log_errors', 1);
+    // Make all errors visible.
+    error_reporting(E_ALL);
+
     // Reset all statics so that test is performed with a clean environment.
     drupal_static_reset();
 
@@ -556,7 +558,7 @@ class DrupalUnitTestCase extends DrupalT
     }
   }
 
-  function tearDown() {
+  protected function tearDown() {
     global $db_prefix, $conf;
     if (preg_match('/simpletest\d+/', $db_prefix)) {
       $conf['file_public_path'] = $this->originalFileDirectory;
@@ -1055,6 +1057,8 @@ class DrupalWebTestCase extends DrupalTe
     // Log fatal errors.
     ini_set('log_errors', 1);
     ini_set('error_log', $directory . '/error.log');
+    // Make all errors visible.
+    error_reporting(E_ALL);
 
     // Reset all statics so that test is performed with a clean environment.
     drupal_static_reset();
@@ -1357,14 +1361,16 @@ class DrupalWebTestCase extends DrupalTe
    */
   protected function parse() {
     if (!$this->elements) {
-      // DOM can load HTML soup. But, HTML soup can throw warnings, suppress
-      // them.
-      @$htmlDom = DOMDocument::loadHTML($this->content);
-      if ($htmlDom) {
+      // Suppress all libxml warnings during loading of HTML.
+      // @todo Remove this when core produces XHTML valid output.
+      libxml_use_internal_errors(TRUE);
+      $document = new DOMDocument();
+      $result = $document->loadHTML($this->content);
+      if ($result) {
         $this->pass(t('Valid HTML found on "@path"', array('@path' => $this->getUrl())), t('Browser'));
         // It's much easier to work with simplexml than DOM, luckily enough
         // we can just simply import our DOM tree.
-        $this->elements = simplexml_import_dom($htmlDom);
+        $this->elements = simplexml_import_dom($document);
       }
     }
     if (!$this->elements) {
Index: modules/simpletest/tests/common.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v
retrieving revision 1.95
diff -u -p -r1.95 common.test
--- modules/simpletest/tests/common.test	6 Dec 2009 17:01:52 -0000	1.95
+++ modules/simpletest/tests/common.test	9 Dec 2009 23:20:36 -0000
@@ -801,8 +801,8 @@ class DrupalHTTPRequestTestCase extends 
 
     // Parse URL schema.
     $missing_scheme = drupal_http_request('example.com/path');
-    $this->assertEqual($missing_scheme->code, -1002, t('Returned with "-1002" error code.'));
-    $this->assertEqual($missing_scheme->error, 'missing schema', t('Returned with "missing schema" error message.'));
+    $this->assertEqual($missing_scheme->code, -1001, t('Returned with "-1001" error code.'));
+    $this->assertEqual($missing_scheme->error, 'unable to parse URL', t('Returned with "unable to parse URL" error message.'));
 
     $unable_to_parse = drupal_http_request('http:///path');
     $this->assertEqual($unable_to_parse->code, -1001, t('Returned with "-1001" error code.'));
@@ -860,8 +860,8 @@ class DrupalHTTPRequestTestCase extends 
     $this->assertFalse(isset($redirect_301->redirect_code), t('drupal_http_request does not follow 301 redirect if max_redirects = 0.'));
 
     $redirect_invalid = drupal_http_request(url('system-test/redirect-noscheme', array('absolute' => TRUE)), array('max_redirects' => 1));
-    $this->assertEqual($redirect_invalid->code, -1002, t('301 redirect to invalid URL returned with error code !error.', array('!error' => $redirect_invalid->error)));
-    $this->assertEqual($redirect_invalid->error, 'missing schema', t('301 redirect to invalid URL returned with error message "!error".', array('!error' => $redirect_invalid->error)));
+    $this->assertEqual($redirect_invalid->code, -1001, t('301 redirect to invalid URL returned with error code !error.', array('!error' => $redirect_invalid->error)));
+    $this->assertEqual($redirect_invalid->error, 'unable to parse URL', t('301 redirect to invalid URL returned with error message "!error".', array('!error' => $redirect_invalid->error)));
 
     $redirect_invalid = drupal_http_request(url('system-test/redirect-noparse', array('absolute' => TRUE)), array('max_redirects' => 1));
     $this->assertEqual($redirect_invalid->code, -1001, t('301 redirect to invalid URL returned with error message code "!error".', array('!error' => $redirect_invalid->error)));
Index: modules/simpletest/tests/file.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/file.test,v
retrieving revision 1.46
diff -u -p -r1.46 file.test
--- modules/simpletest/tests/file.test	10 Nov 2009 17:27:53 -0000	1.46
+++ modules/simpletest/tests/file.test	9 Dec 2009 23:30:04 -0000
@@ -288,16 +288,22 @@ class FileSpaceUsedTest extends FileTest
     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));
+    $file = array('uid' => 2, 'uri' => 'public://example1.txt', 'filesize' => 50, 'status' => FILE_STATUS_PERMANENT);
+    drupal_write_record('file', $file);
+    $file = array('uid' => 2, 'uri' => 'public://example2.txt', 'filesize' => 20, 'status' => FILE_STATUS_PERMANENT);
+    drupal_write_record('file', $file);
+    $file = array('uid' => 3, 'uri' => 'public://example3.txt', 'filesize' => 100, 'status' => FILE_STATUS_PERMANENT);
+    drupal_write_record('file', $file);
+    $file = array('uid' => 3, 'uri' => 'public://example4.txt', 'filesize' => 200, 'status' => FILE_STATUS_PERMANENT);
+    drupal_write_record('file', $file);
 
     // 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));
+    $file = array('uid' => 2, 'uri' => 'public://example5.txt', 'filesize' => 1, 'status' => 2 | 8);
+    drupal_write_record('file', $file);
+    $file = array('uid' => 3, 'uri' => 'public://example6.txt', 'filesize' => 3, 'status' => 2 | 4);
+    drupal_write_record('file', $file);
   }
 
   /**
@@ -722,7 +728,9 @@ class FileDirectoryTest extends FileTest
 
     // Remove .htaccess file to then test that it gets re-created.
     $directory = file_directory_path();
-    @unlink($directory . '/.htaccess');
+    if (file_exists($directory . '/.htaccess')) {
+      unlink($directory . '/.htaccess');
+    }
     $this->assertFalse(is_file($directory . '/.htaccess'), t('Successfully removed the .htaccess file in the files directory.'), 'File');
     file_ensure_htaccess();
     $this->assertTrue(is_file($directory . '/.htaccess'), t('Successfully re-created the .htaccess file in the files directory.'), 'File');
@@ -1582,7 +1590,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 +1599,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/session.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/session.test,v
retrieving revision 1.21
diff -u -p -r1.21 session.test
--- modules/simpletest/tests/session.test	9 Dec 2009 19:22:04 -0000	1.21
+++ modules/simpletest/tests/session.test	9 Dec 2009 23:01:57 -0000
@@ -345,7 +345,7 @@ class SessionHttpsTestCase extends Drupa
 
     // Check that user login form action is secure.
     $this->drupalGet('user');
-    $form = &$this->xpath('//form[@id="user-login"]');
+    $form = $this->xpath('//form[@id="user-login"]');
     $this->assertEqual(substr($form[0]['action'], 0, 6), 'https:', 'Login form action is secure');
     $form[0]['action'] = $this->httpsUrl('user');
 
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.858
diff -u -p -r1.858 system.module
--- modules/system/system.module	9 Dec 2009 18:52:31 -0000	1.858
+++ modules/system/system.module	9 Dec 2009 20:21:15 -0000
@@ -2137,6 +2137,7 @@ function _system_rebuild_module_data() {
 
   // Include the install profile in modules that are loaded.
   $profile = drupal_get_profile();
+  $modules[$profile] = new stdClass;
   $modules[$profile]->name = $profile;
   $modules[$profile]->uri = 'profiles/' . $profile . '/' . $profile . '.profile';
   $modules[$profile]->filename = $profile . '.profile';
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.95
diff -u -p -r1.95 system.test
--- modules/system/system.test	8 Dec 2009 06:39:34 -0000	1.95
+++ modules/system/system.test	9 Dec 2009 21:22:44 -0000
@@ -235,7 +235,7 @@ class ModuleVersionTestCase extends Modu
     );
   }
 
-  function setup() {
+  function setUp() {
     parent::setUp('module_test');
   }
 
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.545
diff -u -p -r1.545 taxonomy.module
--- modules/taxonomy/taxonomy.module	4 Dec 2009 16:49:47 -0000	1.545
+++ modules/taxonomy/taxonomy.module	9 Dec 2009 22:02:49 -0000
@@ -903,7 +903,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.63
diff -u -p -r1.63 taxonomy.test
--- modules/taxonomy/taxonomy.test	2 Dec 2009 19:26:22 -0000	1.63
+++ modules/taxonomy/taxonomy.test	9 Dec 2009 23:04:47 -0000
@@ -441,7 +441,8 @@ class TaxonomyTermTestCase extends Taxon
     // Create the term to edit.
     $this->drupalPost('admin/structure/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.
@@ -672,7 +673,8 @@ class TaxonomyHooksTestCase extends Taxo
       'antonym' => 'Long',
     );
     $this->drupalPost('admin/structure/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->antonym, $edit['antonym'], t('Antonym was loaded into the term object'));
 
     // Update the term with a different antonym.
Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.70
diff -u -p -r1.70 user.test
--- modules/user/user.test	1 Dec 2009 22:30:31 -0000	1.70
+++ modules/user/user.test	9 Dec 2009 23:11:01 -0000
@@ -26,7 +26,8 @@ class UserRegistrationTestCase extends D
     $edit['mail'] = $mail = $edit['name'] . '@example.com';
     $this->drupalPost('user/register', $edit, t('Create new account'));
     $this->assertText(t('Your password and further instructions have been sent to your e-mail address.'), t('User registered successfully.'));
-    $new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
+    $accounts = user_load_multiple(array(), array('name' => $name, 'mail' => $mail));
+    $new_user = reset($accounts);
     $this->assertTrue($new_user->status, t('New account is active after registration.'));
 
     // Allow registration by site visitors, but require administrator approval.
@@ -35,7 +36,8 @@ class UserRegistrationTestCase extends D
     $edit['name'] = $name = $this->randomName();
     $edit['mail'] = $mail = $edit['name'] . '@example.com';
     $this->drupalPost('user/register', $edit, t('Create new account'));
-    $new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
+    $accounts = user_load_multiple(array(), array('name' => $name, 'mail' => $mail));
+    $new_user = reset($accounts);
     $this->assertFalse($new_user->status, t('New account is blocked until approved by an administrator.'));
   }
 
@@ -59,7 +61,8 @@ class UserRegistrationTestCase extends D
     $edit['pass[pass1]'] = $new_pass = $this->randomName();
     $edit['pass[pass2]'] = $new_pass;
     $this->drupalPost('user/register', $edit, t('Create new account'));
-    $new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
+    $accounts = user_load_multiple(array(), array('name' => $name, 'mail' => $mail));
+    $new_user = reset($accounts);
     $this->assertText(t('Registration successful. You are now logged in.'), t('Users are logged in after registering.'));
     $this->drupalLogout();
 
@@ -82,7 +85,8 @@ class UserRegistrationTestCase extends D
     $this->assertText(t('The username @name has not been activated or is blocked.', array('@name' => $name)), t('User cannot login yet.'));
 
     // Activate the new account.
-    $new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
+    $accounts = user_load_multiple(array(), array('name' => $name, 'mail' => $mail));
+    $new_user = reset($accounts);
     $admin_user = $this->drupalCreateUser(array('administer users'));
     $this->drupalLogin($admin_user);
     $edit = array(
@@ -115,7 +119,8 @@ class UserRegistrationTestCase extends D
     $this->drupalPost('user/register', $edit, t('Create new account'));
 
     // Check user fields.
-    $new_user = reset(user_load_multiple(array(), array('name' => $name, 'mail' => $mail)));
+    $accounts = user_load_multiple(array(), array('name' => $name, 'mail' => $mail));
+    $new_user = reset($accounts);
     $this->assertEqual($new_user->name, $name, t('Username matches.'));
     $this->assertEqual($new_user->mail, $mail, t('E-mail address matches.'));
     $this->assertEqual($new_user->theme, '', t('Correct theme field.'));
@@ -371,7 +376,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.'));
+    $accounts = user_load_multiple(array($account->uid), array('status' => 1));
+    $this->assertTrue(reset($accounts), t('User account was not canceled.'));
 
     // Confirm user's content has not been altered.
     $test_node = node_load($node->nid, NULL, TRUE);
@@ -725,7 +731,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'));
+        $files = $this->drupalGetTestFiles('image');
+        $image = end($files);
         $info = image_get_info($image->uri);
 
         // Set new variables: valid dimensions, invalid filesize.
