Skip to content
Browse files

Issue #1409052 by mkadin: Fixed hook_menu() should state that auto-lo…

…aders should return FALSE to indicate nothing found and trigger a 404.
  • Loading branch information...
1 parent 8abbf61 commit 2c51f2d61dc6bfab7cf179c36d69851b9db07e03 @webchick webchick committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 modules/system/system.api.php
View
6 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

0 comments on commit 2c51f2d

Please sign in to comment.
Something went wrong with that request. Please try again.