? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: .htaccess
===================================================================
RCS file: /cvs/drupal/drupal/.htaccess,v
retrieving revision 1.107
diff -u -p -r1.107 .htaccess
--- .htaccess	7 Feb 2010 05:20:21 -0000	1.107
+++ .htaccess	15 Feb 2010 21:07:24 -0000
@@ -38,6 +38,8 @@ DirectoryIndex index.php index.html inde
   php_value mbstring.http_input             pass
   php_value mbstring.http_output            pass
   php_flag mbstring.encoding_translation    off
+  # Report all PHP errors, including compile-time errors.
+  php_value error_reporting                 -1
 </IfModule>
 
 # Requires mod_expires to be enabled.
Index: CHANGELOG.txt
===================================================================
RCS file: /cvs/drupal/drupal/CHANGELOG.txt,v
retrieving revision 1.354
diff -u -p -r1.354 CHANGELOG.txt
--- CHANGELOG.txt	31 Jan 2010 18:31:46 -0000	1.354
+++ CHANGELOG.txt	15 Feb 2010 21:07:25 -0000
@@ -84,6 +84,8 @@ Drupal 7.0, xxxx-xx-xx (development vers
     * If your site is being upgraded from Drupal 6 and you do not have the
       contributed date or event modules installed, user time zone settings will
       fallback to the system time zone and will have to be reconfigured by each user.
+    * User-configured time zones now serve as the default time zone for PHP
+      date/time functions.
 - Filter system:
     * Revamped the filter API and text format storage.
     * Added support for default text formats to be assigned on a per-role basis.
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.236
diff -u -p -r1.236 install.php
--- install.php	1 Feb 2010 22:13:33 -0000	1.236
+++ install.php	15 Feb 2010 21:07:25 -0000
@@ -1202,7 +1202,8 @@ function install_select_locale(&$install
         }
         else {
           include_once DRUPAL_ROOT . '/includes/form.inc';
-          $output = drupal_render(drupal_get_form('install_select_locale_form', $locales, $profilename));
+          $elements = drupal_get_form('install_select_locale_form', $locales, $profilename);
+          $output = drupal_render($elements);
         }
         return $output;
       }
@@ -1235,7 +1236,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, $profilename));
+        $elements = drupal_get_form('install_select_locale_form', $locales, $profilename);
+        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.316
diff -u -p -r1.316 update.php
--- update.php	3 Feb 2010 18:16:22 -0000	1.316
+++ update.php	15 Feb 2010 21:07:25 -0000
@@ -30,7 +30,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/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.349
diff -u -p -r1.349 bootstrap.inc
--- includes/bootstrap.inc	15 Feb 2010 15:52:27 -0000	1.349
+++ includes/bootstrap.inc	15 Feb 2010 21:07:25 -0000
@@ -499,9 +499,6 @@ function drupal_environment_initialize()
   // e.g. "&" or "%" that have special meanings in URLs and must be encoded.
   $_GET['q'] = request_path();
 
-  // Enforce E_ALL, but allow users to set levels not part of E_ALL.
-  error_reporting(E_ALL | error_reporting());
-
   // Override PHP settings required for Drupal to work properly.
   // sites/default/default.settings.php contains more runtime settings.
   // The .htaccess file contains settings that cannot be changed at runtime.
@@ -1565,6 +1562,21 @@ function drupal_bootstrap($phase = NULL,
 }
 
 /**
+ * Return the time zone of the current user.
+ */
+function drupal_get_user_timezone() {
+  global $user;
+  if (variable_get('configurable_timezones', 1) && $user->uid && $user->timezone) {
+    return $user->timezone;
+  }
+  else {
+    // Ignore PHP strict notice if time zone has not yet been set in the php.ini
+    // configuration.
+    return variable_get('date_default_timezone', @date_default_timezone_get());
+  }
+}
+
+/**
  * Custom PHP error handler.
  *
  * @param $error_level
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1106
diff -u -p -r1.1106 common.inc
--- includes/common.inc	15 Feb 2010 15:52:27 -0000	1.1106
+++ includes/common.inc	15 Feb 2010 21:07:26 -0000
@@ -2021,13 +2021,7 @@ function format_date($timestamp, $type =
   $timezones = &$drupal_static_fast['timezones'];
 
   if (!isset($timezone)) {
-    global $user;
-    if (variable_get('configurable_timezones', 1) && $user->uid && $user->timezone) {
-      $timezone = $user->timezone;
-    }
-    else {
-      $timezone = variable_get('date_default_timezone', 'UTC');
-    }
+    $timezone = date_default_timezone_get();
   }
   // Store DateTimeZone objects in an array rather than repeatedly
   // constructing identical objects over the life of a request.
Index: includes/errors.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/errors.inc,v
retrieving revision 1.1
diff -u -p -r1.1 errors.inc
--- includes/errors.inc	15 Feb 2010 16:25:06 -0000	1.1
+++ includes/errors.inc	15 Feb 2010 21:07:26 -0000
@@ -186,7 +186,7 @@ function _drupal_log_error($error, $fata
     // Display the message if the current error reporting level allows this type
     // of message to be displayed, and unconditionnaly in update.php.
     $error_level = variable_get('error_level', ERROR_REPORTING_DISPLAY_ALL);
-    $display_error = $error_level == ERROR_REPORTING_DISPLAY_ALL || ($error_level == ERROR_REPORTING_DISPLAY_SOME && $error['%type'] != 'Notice');
+    $display_error = $error_level == ERROR_REPORTING_DISPLAY_ALL || ($error_level == ERROR_REPORTING_DISPLAY_SOME && $error['%type'] != 'Notice' && $error['%type'] != 'Strict warning');
     if ($display_error || (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update')) {
       $class = 'error';
 
Index: includes/session.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/session.inc,v
retrieving revision 1.77
diff -u -p -r1.77 session.inc
--- includes/session.inc	25 Jan 2010 10:38:34 -0000	1.77
+++ includes/session.inc	15 Feb 2010 21:07:26 -0000
@@ -207,6 +207,7 @@ function drupal_session_initialize() {
     $user = drupal_anonymous_user();
     session_id(md5(uniqid('', TRUE)));
   }
+  date_default_timezone_set(drupal_get_user_timezone());
 }
 
 /**
@@ -308,6 +309,7 @@ function drupal_session_regenerate() {
       ->condition('sid', $old_session_id)
       ->execute();
   }
+  date_default_timezone_set(drupal_get_user_timezone());
 }
 
 /**
Index: includes/filetransfer/filetransfer.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/filetransfer/filetransfer.inc,v
retrieving revision 1.8
diff -u -p -r1.8 filetransfer.inc
--- includes/filetransfer/filetransfer.inc	25 Jan 2010 10:38:34 -0000	1.8
+++ includes/filetransfer/filetransfer.inc	15 Feb 2010 21:07:26 -0000
@@ -24,7 +24,16 @@ abstract class FileTransfer {
     $this->jail = $jail;
   }
 
-  abstract static function factory($jail, $settings);
+  /**
+   * Classes that extend this class must override the factory() static method.
+   *
+   * @param string $jail
+   * @param array $settings
+   * @return object New instance of the appropriate FileTransfer subclass.
+   */
+  static function factory($jail, $settings) {
+    throw new FileTransferException('FileTransfer::factory() static method not overridden by FileTransfer subclass.');
+  }
 
   /**
    * Implementation of the magic __get() method.
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.537
diff -u -p -r1.537 book.module
--- modules/book/book.module	30 Jan 2010 04:23:46 -0000	1.537
+++ modules/book/book.module	15 Feb 2010 21:07:26 -0000
@@ -745,7 +745,11 @@ function book_children($book_link) {
     }
   }
 
-  return $children ? drupal_render(menu_tree_output($children)) : '';
+  if ($children) {
+    $elements = menu_tree_output($children);
+    return drupal_render($elements);
+  }
+  return '';
 }
 
 /**
Index: modules/color/color.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.test,v
retrieving revision 1.2
diff -u -p -r1.2 color.test
--- modules/color/color.test	1 Dec 2009 22:30:30 -0000	1.2
+++ modules/color/color.test	15 Feb 2010 21:07:26 -0000
@@ -37,9 +37,8 @@ class ColorTestCase extends DrupalWebTes
     $edit['palette[link]'] = '#123456';
     $this->drupalPost('admin/appearance/settings/garland', $edit, t('Save configuration'));
 
-    global $theme_key;
     $this->drupalGet('<front>');
-    $stylesheets = variable_get('color_' . $theme_key . '_stylesheets', array());
+    $stylesheets = variable_get('color_garland_stylesheets', array());
     $this->assertPattern('|' . file_create_url($stylesheets[0]) . '|', 'Make sure the color stylesheet is included in the content.');
 
     $stylesheet_content = join("\n", file($stylesheets[0]));
Index: modules/field_ui/field_ui.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field_ui/field_ui.admin.inc,v
retrieving revision 1.42
diff -u -p -r1.42 field_ui.admin.inc
--- modules/field_ui/field_ui.admin.inc	12 Feb 2010 05:38:10 -0000	1.42
+++ modules/field_ui/field_ui.admin.inc	15 Feb 2010 21:07:26 -0000
@@ -655,6 +655,7 @@ function template_preprocess_field_ui_di
     $row = new stdClass();
     foreach (element_children($element) as $child) {
       if (array_key_exists('label', $element[$child])) {
+        $row->{$child} = new stdClass();
         $row->{$child}->label = drupal_render($element[$child]['label']);
         $row->{$child}->type = drupal_render($element[$child]['type']);
       }
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.555
diff -u -p -r1.555 forum.module
--- modules/forum/forum.module	11 Feb 2010 17:44:47 -0000	1.555
+++ modules/forum/forum.module	15 Feb 2010 21:07:27 -0000
@@ -302,7 +302,8 @@ function forum_node_presave($node) {
   if (_forum_node_check_node_type($node)) {
     // Make sure all fields are set properly:
     $node->icon = !empty($node->icon) ? $node->icon : '';
-    $langcode = array_shift(array_keys($node->taxonomy_forums));
+    reset($node->taxonomy_forums);
+    $langcode = key($node->taxonomy_forums);
     if (!empty($node->taxonomy_forums[$langcode])) {
       $node->forum_tid = $node->taxonomy_forums[$langcode][0]['tid'];
       $old_tid = db_query_range("SELECT f.tid FROM {forum} f INNER JOIN {node} n ON f.vid = n.vid WHERE n.nid = :nid ORDER BY f.vid DESC", 0, 1, array(':nid' => $node->nid))->fetchField();
Index: modules/image/image.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.test,v
retrieving revision 1.14
diff -u -p -r1.14 image.test
--- modules/image/image.test	14 Feb 2010 20:38:28 -0000	1.14
+++ modules/image/image.test	15 Feb 2010 21:07:27 -0000
@@ -248,7 +248,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.',
Index: modules/locale/locale.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.admin.inc,v
retrieving revision 1.5
diff -u -p -r1.5 locale.admin.inc
--- modules/locale/locale.admin.inc	12 Feb 2010 16:15:17 -0000	1.5
+++ modules/locale/locale.admin.inc	15 Feb 2010 21:07:27 -0000
@@ -784,7 +784,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;
 }
@@ -1024,9 +1025,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;
 }
 
@@ -1355,6 +1358,7 @@ function locale_date_format_form($form, 
       $choices[$f] = format_date(REQUEST_TIME, 'custom', $f);
     }
   }
+  reset($formats);
 
   // Get configured formats for each language.
   $locale_formats = system_date_format_locale($langcode);
@@ -1364,7 +1368,7 @@ function locale_date_format_form($form, 
       $default = $locale_formats[$type];
     }
     else {
-      $default = variable_get('date_format_' . $type, array_shift(array_keys($formats)));
+      $default = variable_get('date_format_' . $type, key($formats));
     }
 
     // Show date format select list.
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1232
diff -u -p -r1.1232 node.module
--- modules/node/node.module	15 Feb 2010 19:00:30 -0000	1.1232
+++ modules/node/node.module	15 Feb 2010 21:07:27 -0000
@@ -3475,7 +3475,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_view(clone $node)), $keyword) !== FALSE || strpos($node->title, $keyword) !== FALSE) {
+    $elements = node_view(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.114
diff -u -p -r1.114 node.pages.inc
--- modules/node/node.pages.inc	10 Feb 2010 10:34:50 -0000	1.114
+++ modules/node/node.pages.inc	15 Feb 2010 21:07:27 -0000
@@ -400,8 +400,10 @@ function theme_node_preview($variables) 
 
   $preview_trimmed_version = FALSE;
 
-  $trimmed = drupal_render(node_view(clone $node, 'teaser'));
-  $full = drupal_render(node_view($node, 'full'));
+  $elements = node_view(clone $node, 'teaser');
+  $trimmed = drupal_render($elements);
+  $elements = node_view($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.23
diff -u -p -r1.23 openid.inc
--- modules/openid/openid.inc	31 Jan 2010 18:39:46 -0000	1.23
+++ modules/openid/openid.inc	15 Feb 2010 21:07:27 -0000
@@ -70,7 +70,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.338
diff -u -p -r1.338 poll.module
--- modules/poll/poll.module	2 Feb 2010 07:39:21 -0000	1.338
+++ modules/poll/poll.module	15 Feb 2010 21:07:27 -0000
@@ -844,7 +844,8 @@ function theme_poll_choices($variables) 
 function template_preprocess_poll_results(&$variables) {
   $variables['links'] = theme('links__poll_results', array('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/rdf/rdf.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/rdf/rdf.test,v
retrieving revision 1.13
diff -u -p -r1.13 rdf.test
--- modules/rdf/rdf.test	15 Feb 2010 18:40:43 -0000	1.13
+++ modules/rdf/rdf.test	15 Feb 2010 21:07:27 -0000
@@ -412,7 +412,11 @@ class RdfTrackerAttributesTestCase exten
 
     // Tests that the appropriate RDFa markup to annotate the latest activity
     // date has been added to the tracker output after a comment is posted.
-    CommentHelperCase::postComment($node, $this->randomName(), $this->randomName());
+    $comment = array(
+      'subject' => $this->randomName(),
+      'comment_body[' . LANGUAGE_NONE . '][0][value]' => $this->randomName(),
+    );
+    $this->drupalPost('comment/reply/' . $node->nid, $comment, t('Save'));
     $this->drupalGet('tracker');
 
     // Tests whether the property has been set for number of comments.
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.196
diff -u -p -r1.196 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	9 Feb 2010 12:28:39 -0000	1.196
+++ modules/simpletest/drupal_web_test_case.php	15 Feb 2010 21:07:27 -0000
@@ -1181,6 +1181,7 @@ class DrupalWebTestCase extends DrupalTe
     variable_set('install_task', 'done');
     variable_set('clean_url', $clean_url_original);
     variable_set('site_mail', 'simpletest@example.com');
+    variable_set('date_default_timezone', date_default_timezone_get());
     // Set up English language.
     unset($GLOBALS['conf']['language_default']);
     $language = language_default();
@@ -1966,7 +1967,7 @@ class DrupalWebTestCase extends DrupalTe
       // CURL breaks in drupalGet() if the URL contains a fragment.
       // @todo remove when http://drupal.org/node/671520 is fixed.
       // Strips off any fragment from the path.
-      $url_target = array_shift(explode('#', $url_target));
+      $url_target = strtok($url_target, '#');
       return $this->drupalGet($url_target);
     }
     return FALSE;
Index: modules/simpletest/tests/ajax.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/ajax.test,v
retrieving revision 1.5
diff -u -p -r1.5 ajax.test
--- modules/simpletest/tests/ajax.test	12 Dec 2009 23:36:28 -0000	1.5
+++ modules/simpletest/tests/ajax.test	15 Feb 2010 21:07:27 -0000
@@ -11,7 +11,7 @@ class AJAXTestCase extends DrupalWebTest
  * Tests primary AJAX framework functions.
  */
 class AJAXFrameworkTestCase extends AJAXTestCase {
-  function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => 'AJAX framework',
       'description' => 'Performs tests on AJAX framework functions.',
@@ -51,7 +51,7 @@ class AJAXFrameworkTestCase extends AJAX
  * Tests AJAX framework commands.
  */
 class AJAXCommandsTestCase extends AJAXTestCase {
-  function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => 'AJAX commands',
       'description' => 'Performs tests on AJAX framework commands.',
Index: modules/simpletest/tests/common.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v
retrieving revision 1.102
diff -u -p -r1.102 common.test
--- modules/simpletest/tests/common.test	11 Feb 2010 17:44:47 -0000	1.102
+++ modules/simpletest/tests/common.test	15 Feb 2010 21:07:28 -0000
@@ -1722,6 +1722,8 @@ class FormatDateUnitTest extends DrupalW
     $user = user_load($test_user->uid, TRUE);
     $real_language = $language->language;
     $language->language = $user->language;
+    // Simulate a Drupal bootstrap with the logged-in user.
+    date_default_timezone_set(drupal_get_user_timezone());
 
     $this->assertIdentical(format_date($timestamp, 'custom', 'l, d-M-y H:i:s T', 'America/Los_Angeles', 'en'), 'Sunday, 25-Mar-07 17:00:00 PDT', t('Test a different language.'));
     $this->assertIdentical(format_date($timestamp, 'custom', 'l, d-M-y H:i:s T', 'Europe/London'), 'Monday, 26-Mar-07 01:00:00 BST', t('Test a different time zone.'));
@@ -1734,6 +1736,8 @@ class FormatDateUnitTest extends DrupalW
     // Restore the original user and language, and enable session saving.
     $user = $real_user;
     $language->language = $real_language;
+    // Restore default time zone.
+    date_default_timezone_set(drupal_get_user_timezone());
     drupal_save_session(TRUE);
   }
 }
Index: modules/simpletest/tests/database_test.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/database_test.test,v
retrieving revision 1.80
diff -u -p -r1.80 database_test.test
--- modules/simpletest/tests/database_test.test	13 Jan 2010 05:49:41 -0000	1.80
+++ modules/simpletest/tests/database_test.test	15 Feb 2010 21:07:28 -0000
@@ -3090,7 +3090,7 @@ class DatabaseExtraTypesTestCase extends
  * Check the sequences API.
  */
 class DatabaseNextIdCase extends DrupalWebTestCase {
-  function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => t('Sequences API'),
       'description' => t('Test the secondary sequences API.'),
@@ -3117,7 +3117,7 @@ class DatabaseNextIdCase extends DrupalW
  * Tests the empty pseudo-statement class.
  */
 class DatabaseEmptyStatementTestCase extends DrupalWebTestCase {
-  function getInfo() {
+  public static function getInfo() {
     return array(
       'name' => t('Empty statement'),
       'description' => t('Test the empty pseudo-statement class.'),
Index: modules/simpletest/tests/mail.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/mail.test,v
retrieving revision 1.2
diff -u -p -r1.2 mail.test
--- modules/simpletest/tests/mail.test	16 Oct 2009 03:01:54 -0000	1.2
+++ modules/simpletest/tests/mail.test	15 Feb 2010 21:07:28 -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.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.259
diff -u -p -r1.259 system.admin.inc
--- modules/system/system.admin.inc	15 Feb 2010 15:07:57 -0000	1.259
+++ modules/system/system.admin.inc	15 Feb 2010 21:07:28 -0000
@@ -210,7 +210,7 @@ function _system_theme_list() {
  */
 function system_themes_page() {
   // Get current list of themes.
-  $themes =& _system_theme_list();
+  $themes = _system_theme_list();
 
   $theme_default = variable_get('theme_default', 'garland');
   $theme_groups  = array();
@@ -369,7 +369,7 @@ function system_theme_enable() {
   if (isset($_REQUEST['theme']) && isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], 'system-theme-operation-link')) {
     $theme = $_REQUEST['theme'];
     // Get current list of themes.
-    $themes =& _system_theme_list();
+    $themes = _system_theme_list();
 
     // Check if the specified theme is one recognized by the system.
     if (!empty($themes[$theme])) {
@@ -391,7 +391,7 @@ function system_theme_disable() {
   if (isset($_REQUEST['theme']) && isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], 'system-theme-operation-link')) {
     $theme = $_REQUEST['theme'];
     // Get current list of themes.
-    $themes =& _system_theme_list();
+    $themes = _system_theme_list();
 
     // Check if the specified theme is one recognized by the system.
     if (!empty($themes[$theme])) {
@@ -419,7 +419,7 @@ function system_theme_default() {
   if (isset($_REQUEST['theme']) && isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], 'system-theme-operation-link')) {
     $theme = $_REQUEST['theme'];
     // Get current list of themes.
-    $themes =& _system_theme_list();
+    $themes = _system_theme_list();
 
     // Check if the specified theme is one recognized by the system.
     if (!empty($themes[$theme])) {
@@ -1948,7 +1948,8 @@ function system_date_time_settings() {
       foreach ($formats as $f => $format) {
         $choices[$f] = format_date(REQUEST_TIME, 'custom', $f);
       }
-      $default = variable_get('date_format_' . $type, array_shift(array_keys($formats)));
+      reset($formats);
+      $default = variable_get('date_format_' . $type, key($formats));
 
       // Get date type info for this date type.
       $type_info = system_get_date_types($type);
Index: modules/trigger/trigger.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.module,v
retrieving revision 1.58
diff -u -p -r1.58 trigger.module
--- modules/trigger/trigger.module	26 Dec 2009 16:50:09 -0000	1.58
+++ modules/trigger/trigger.module	15 Feb 2010 21:07:28 -0000
@@ -484,7 +484,8 @@ function trigger_user_login(&$edit, $acc
  * Implements hook_user_logout().
  */
 function trigger_user_logout($account) {
-  _trigger_user('user_logout', $edit = NULL, $account);
+  $edit = NULL;
+  _trigger_user('user_logout', $edit, $account);
 }
 
 /**
@@ -524,7 +525,8 @@ function trigger_user_cancel($edit, $acc
  * Implements hook_user_view().
  */
 function trigger_user_view($account) {
-  _trigger_user('user_view', $edit = NULL, $account, NULL);
+  $edit = NULL;
+  _trigger_user('user_view', $edit, $account, NULL);
 }
 
 /**
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1124
diff -u -p -r1.1124 user.module
--- modules/user/user.module	13 Feb 2010 21:19:16 -0000	1.1124
+++ modules/user/user.module	15 Feb 2010 21:07:28 -0000
@@ -372,6 +372,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);
     }
