summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-01-31 00:14:31 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-01-31 00:14:31 -0800
commit2c51f2d61dc6bfab7cf179c36d69851b9db07e03 (patch)
tree9d94826aefc783e67b400d3ff082f20ab9d6cf6d
parent8abbf61f0eb99138574d3096c38c0f7fec4a6d13 (diff)
downloadbrdo-2c51f2d61dc6bfab7cf179c36d69851b9db07e03.tar.gz
brdo-2c51f2d61dc6bfab7cf179c36d69851b9db07e03.tar.bz2
Issue #1409052 by mkadin: Fixed hook_menu() should state that auto-loaders should return FALSE to indicate nothing found and trigger a 404.
-rw-r--r--modules/system/system.api.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 7beb8b37f..cb67268ca 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -1019,7 +1019,11 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) {
* @endcode
* This 'abc' object will then be passed into the callback functions defined
* for the menu item, such as the page callback function mymodule_abc_edit()
- * to replace the integer 1 in the argument array.
+ * to replace the integer 1 in the argument array. Note that a load function
+ * should return FALSE when it is unable to provide a loadable object. For
+ * example, the node_load() function for the 'node/%node/edit' menu item will
+ * return FALSE for the path 'node/999/edit' if a node with a node ID of 999
+ * does not exist. The menu routing system will return a 404 error in this case.
*
* You can also define a %wildcard_to_arg() function (for the example menu
* entry above this would be 'mymodule_abc_to_arg()'). The _to_arg() function