? sites/all/modules/contrib
? sites/default/files
? sites/default/settings.php
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1244
diff -u -p -r1.1244 common.inc
--- includes/common.inc	21 Oct 2010 19:31:39 -0000	1.1244
+++ includes/common.inc	22 Oct 2010 07:59:29 -0000
@@ -5740,9 +5740,10 @@ function drupal_render_cid_create($eleme
 /**
  * Function used by uasort to sort structured arrays by weight.
  */
-function element_sort($a, $b) {
-  $a_weight = (is_array($a) && isset($a['#weight'])) ? $a['#weight'] : 0;
-  $b_weight = (is_array($b) && isset($b['#weight'])) ? $b['#weight'] : 0;
+function element_sort(array $a, array $b) {
+  $a_weight = isset($a['#weight']) ? $a['#weight'] : 0;
+  $b_weight = isset($b['#weight']) ? $b['#weight'] : 0;
+
   if ($a_weight == $b_weight) {
     return 0;
   }
@@ -5784,9 +5785,9 @@ function element_info($type) {
 /**
  * Function used by uasort to sort structured arrays by weight, without the property weight prefix.
  */
-function drupal_sort_weight($a, $b) {
-  $a_weight = (is_array($a) && isset($a['weight'])) ? $a['weight'] : 0;
-  $b_weight = (is_array($b) && isset($b['weight'])) ? $b['weight'] : 0;
+function drupal_sort_weight(array $a, array $b) {
+  $a_weight = isset($a['weight']) ? $a['weight'] : 0;
+  $b_weight = isset($b['weight']) ? $b['weight'] : 0;
   if ($a_weight == $b_weight) {
     return 0;
   }
@@ -5803,8 +5804,8 @@ function element_property($key) {
 /**
  * Get properties of a structured array element. Properties begin with '#'.
  */
-function element_properties($element) {
-  return array_filter(array_keys((array) $element), 'element_property');
+function element_properties(array $element) {
+  return array_filter(array_keys($element), 'element_property');
 }
 
 /**
@@ -5834,7 +5835,7 @@ function element_children(&$elements, $s
   foreach ($elements as $key => $value) {
     if ($key === '' || $key[0] !== '#') {
       $children[$key] = $value;
-      if (is_array($value) && isset($value['#weight'])) {
+      if (isset($value['#weight'])) {
         $sortable = TRUE;
       }
     }
