Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.408
diff -u -p -r1.408 menu.inc
--- includes/menu.inc	1 Sep 2010 02:59:04 -0000	1.408
+++ includes/menu.inc	11 Sep 2010 16:01:14 -0000
@@ -517,8 +517,8 @@ function menu_execute_active_handler($pa
 function _menu_load_objects(&$item, &$map) {
   if ($load_functions = $item['load_functions']) {
     // If someone calls this function twice, then unserialize will fail.
-    if ($load_functions_unserialized = unserialize($load_functions)) {
-      $load_functions = $load_functions_unserialized;
+    if (!is_array($load_functions)) {
+      $load_functions = unserialize($load_functions);
     }
     $path_map = $map;
     foreach ($load_functions as $index => $function) {
@@ -3161,7 +3161,7 @@ function _menu_router_build($callbacks) 
       $fit = (1 << $number_parts) - 1;
     }
     $masks[$fit] = 1;
-    $item['load_functions'] = empty($load_functions) ? '' : serialize($load_functions);
+    $item['_load_functions'] = $load_functions;
     $item['to_arg_functions'] = empty($to_arg_functions) ? '' : serialize($to_arg_functions);
     $item += array(
       'title' => '',
@@ -3263,6 +3263,10 @@ function _menu_router_build($callbacks) 
             $item['theme arguments'] = $parent['theme arguments'];
           }
         }
+        // Same for load arguments, if the parent path defines any.
+        if (!isset($item['load arguments']) && !empty($parent['load arguments'])) {
+          $item['_load_functions'] = $parent['_load_functions'];
+        }
       }
     }
     if (!isset($item['access callback']) && isset($item['access arguments'])) {
@@ -3276,6 +3280,7 @@ function _menu_router_build($callbacks) 
       $item['access callback'] = intval($item['access callback']);
     }
 
+    $item['load_functions'] = empty($item['_load_functions']) ? '' : serialize($item['_load_functions']);
     $item += array(
       'access arguments' => array(),
       'access callback' => '',
Index: modules/simpletest/tests/menu.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/menu.test,v
retrieving revision 1.34
diff -u -p -r1.34 menu.test
--- modules/simpletest/tests/menu.test	8 Aug 2010 19:35:49 -0000	1.34
+++ modules/simpletest/tests/menu.test	11 Sep 2010 16:09:14 -0000
@@ -431,6 +431,22 @@ class MenuRouterTestCase extends DrupalW
     $this->assertRaw('title="Test title attribute"', t('Title attribute of a menu link renders.'));
     $this->assertRaw('testparam=testvalue', t('Query parameter added to menu link.'));
   }
+
+  /**
+   * Tests inheritance of 'load arguments'.
+   */
+  function testMenuLoadArgumentsInheritance() {
+    $arg1 = $this->randomName();
+    $arg2 = $this->randomName();
+    $expected = print_r(array('%menu_test_argument' => $arg1, '%' => $arg2), TRUE);
+
+    $this->drupalGet("menu-test/arguments/$arg1/$arg2");
+    $this->assertRaw($expected, t('Inherited load arguments found.'));
+    $this->drupalGet("menu-test/arguments/$arg1/$arg2/default");
+    $this->assertRaw($expected, t('Inherited load arguments found.'));
+    $this->drupalGet("menu-test/arguments/$arg1/$arg2/task");
+    $this->assertRaw($expected, t('Inherited load arguments found.'));
+  }
 }
 
 /**
Index: modules/simpletest/tests/menu_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/menu_test.module,v
retrieving revision 1.15
diff -u -p -r1.15 menu_test.module
--- modules/simpletest/tests/menu_test.module	7 Jul 2010 08:05:01 -0000	1.15
+++ modules/simpletest/tests/menu_test.module	11 Sep 2010 15:42:58 -0000
@@ -195,10 +195,61 @@ function menu_test_menu() {
     'access callback' => TRUE,
   );
 
+  // Load arguments inheritance test.
+  $items['menu-test/arguments/%menu_test_argument/%'] = array(
+    'title' => 'Load arguments inheritance test',
+    'load arguments' => array(3),
+    'page callback' => 'menu_test_arguments',
+    'page arguments' => array(2),
+    'access callback' => TRUE,
+  );
+  $items['menu-test/arguments/%menu_test_argument/%/default'] = array(
+    'title' => 'Default local task',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+  );
+  $items['menu-test/arguments/%menu_test_argument/%/task'] = array(
+    'title' => 'Local task',
+    'page callback' => 'menu_test_arguments',
+    'page arguments' => array(2),
+    'access callback' => TRUE,
+    'type' => MENU_LOCAL_TASK,
+  );
+
   return $items;
 }
 
 /**
+ * Menu argument loader for the 'load arguments' inheritance test.
+ *
+ * @param $arg1
+ *   The path argument defined as %menu_test_argument.
+ * @param $arg2
+ *   The additional path argument that should be passed due to 'load arguments'.
+ *
+ * @return
+ *   An array containing $arg1 and $arg2.
+ */
+function menu_test_argument_load($arg1, $arg2) {
+  return array('%menu_test_argument' => $arg1, '%' => $arg2);
+}
+
+/**
+ * Page callback for the 'load arguments' inheritance test.
+ *
+ * @param $joined_args
+ *   An associative array containing the values for both path arguments, as
+ *   intercepted and processed by menu_test_argument_load():
+ *   - %menu_test_argument: The primary path argument string.
+ *   - %: The additional argument string.
+ *
+ * @return
+ *   A dump of the loaded %menu_test_argument argument.
+ */
+function menu_test_arguments($joined_args) {
+  return print_r($joined_args, TRUE);
+}
+
+/**
  * Dummy callback for hook_menu() to point to.
  *
  * @return
