### Eclipse Workspace Patch 1.0
#P foxpop
Index: sites/all/modules/contrib/hierarchical_select/hierarchical_select.module
===================================================================
--- sites/all/modules/contrib/hierarchical_select/hierarchical_select.module	(revision 79)
+++ sites/all/modules/contrib/hierarchical_select/hierarchical_select.module	(working copy)
@@ -371,7 +371,7 @@
     // AHAH. A normal static variable won't do in this case, because then at
     // least two Hierarchical Select form items will have HSID 0, because they
     // are generated in different requests, both of which will have a first HSID
-    // of 0. This will then cause problems on the page. 
+    // of 0. This will then cause problems on the page.
     if (!isset($_SESSION['hsid'])) {
       $_SESSION['hsid'] = 0;
     }
@@ -2257,18 +2257,20 @@
  *
  * From: http://www.php.net/manual/en/function.array-merge-recursive.php#82976.
  */
-function array_smart_merge($array, $override) {
-  if (is_array($array) && is_array($override)) {
-    foreach ($override as $k => $v) {
-      if (isset($array[$k]) && is_array($v) && is_array($array[$k])) {
-        $array[$k] = array_smart_merge($array[$k], $v);
-      }
-      else {
-        $array[$k] = $v;
+if (!function_exists('array_smart_merge')) {
+  function array_smart_merge($array, $override) {
+    if (is_array($array) && is_array($override)) {
+      foreach ($override as $k => $v) {
+        if (isset($array[$k]) && is_array($v) && is_array($array[$k])) {
+          $array[$k] = array_smart_merge($array[$k], $v);
+        }
+        else {
+          $array[$k] = $v;
+        }
       }
     }
+    return $array;
   }
-  return $array;
 }
 
 /**
