? .DS_Store
? 872680.patch
? 872680_0.patch
? head.db
? sites/default/files
? sites/default/settings.php
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1200
diff -u -p -r1.1200 common.inc
--- includes/common.inc	5 Aug 2010 07:56:14 -0000	1.1200
+++ includes/common.inc	5 Aug 2010 08:33:38 -0000
@@ -5424,9 +5424,9 @@ 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;
   }
@@ -5459,9 +5459,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;
   }
@@ -5471,21 +5471,21 @@ function drupal_sort_weight($a, $b) {
 /**
  * Check if the key is a property.
  */
-function element_property($key) {
+function element_property(array $key) {
   return $key[0] == '#';
 }
 
 /**
  * Get properties of a structured array element. Properties begin with '#'.
  */
-function element_properties($element) {
+function element_properties(array $element) {
   return array_filter(array_keys((array) $element), 'element_property');
 }
 
 /**
  * Check if the key is a child.
  */
-function element_child($key) {
+function element_child(array $key) {
   return !isset($key[0]) || $key[0] != '#';
 }
 
@@ -5499,7 +5499,7 @@ function element_child($key) {
  * @return
  *   The array keys of the element's children.
  */
-function element_children(&$elements, $sort = FALSE) {
+function element_children(array &$elements, $sort = FALSE) {
   // Do not attempt to sort elements which have already been sorted.
   $sort = isset($elements['#sorted']) ? !$elements['#sorted'] : $sort;
 
@@ -5509,7 +5509,7 @@ function element_children(&$elements, $s
   foreach ($elements as $key => $value) {
     if ($key[0] !== '#') {
       $children[$key] = $value;
-      if (is_array($value) && isset($value['#weight'])) {
+      if (isset($value['#weight'])) {
         $sortable = TRUE;
       }
     }
@@ -5941,7 +5941,7 @@ function drupal_write_record($table, &$o
   }
 
   // Convert to an object if needed.
-  if (is_array($object)) {
+  if ($arrayName = array('' => , );array($object)) {
     $object = (object) $object;
     $array = TRUE;
   }
