The first example code listed in the docs has a hook_menu implementation that doesn't return anything:

  function mymodule_menu() {
    $items['abc/def'] = array(
      'page callback' => 'mymodule_abc_view',
    );
  }
CommentFileSizeAuthor
#2 1022172.patch774 bytesmontesq

Comments

jhodgdon’s picture

Version: 7.0 » 7.x-dev
Issue tags: +Novice

Good catch! Actually the first two examples in the docblock are missing return statements, although they are supposed to be complete functions. Should be fixed; good project for a novice core contributor.

montesq’s picture

Status: Active » Needs review
StatusFileSize
new774 bytes

Comments are welcomed

kalebheitzman’s picture

Patch works. Should the last line have a period?

When path 'abc/def' is requested, the page callback function will get 'def'
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

I think the last line is not the end of a sentence, so it doesn't need a period. The patch is fine -- thanks!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice catch!

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Novice

Automatically closed -- issue fixed for 2 weeks with no activity.