summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2012-01-31 08:16:04 (GMT)
committer webchick2012-01-31 08:16:04 (GMT)
commit67d180bafa4cdaae0059c17324de93142a8e9b4c (patch)
tree2b77b44d9ac4806d6ea267561ce269b8eef33544
parent3e17654cf1448a9a86ac3e240a8d90ac879066eb (diff)
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--core/modules/system/system.api.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 5b95ccf..34df7ba 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -609,7 +609,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