Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Oct 2012 at 01:47 UTC
Updated:
29 Jul 2014 at 21:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonThanks for noticing and reporting this! The documentation of the return value should indicate under what conditions FALSE can be returned.
Comment #2
mkadin commentedHere you go. Didn't want to repeat the explanation from _menu_translate() docs.
Did a little English work in the _menu_translate() docs as well.
D7 backport coming shortly.
Comment #3
mkadin commentedComment #4
mkadin commentedD7 patch as well.
Comment #6
jhodgdonPlease read http://drupal.org/node/1319154#multiple-versions regarding uploading D7 patches too soon (however, thanks for the patches!).
Regarding the d8 patch, I think we need to go back up one line and fix one thing:
associate -> associative
Also, the whole thing ... well it still seemed a bit confusing to me. With this patch, the @return reads:
The router item, an associate array corresponding to one row in the
menu_router table or FALSE. The value of key map holds the loaded objects.
The value of key access is TRUE if the current user can access this page.
The values for key title, page_arguments, access_arguments, and
theme_arguments will be filled in based on the database values and the
objects loaded. If an error occurs when objects are loaded via
_menu_translate(), FALSE will be returned.
I had a lot of trouble making sense of this paragraph -- I would suggest reworking it like this:
Either the router item or, if an error occurs, FALSE. A router item is an associative array corresponding to...
Comment #7
mkadin commentedHows this?
Comment #8
jhodgdonBetter, thanks! A few small typographical errors:
- There should be only one space after "." at ends of sentences.
- "associate array" => "associative array"
- I think it would be even easier to read if it said "The value *corresponding* to key 'map' is..." etc. (obviously, without the **).
Comment #9
mkadin commentedAgreed, I didn't like the way the key value pairs were describe either. Here's a shot at it.
Comment #10
jhodgdonI like this version much better, thanks! Provisionally RTBC (pending bot), and I'll get it committed sometime soon (probably tomorrow, I'm done with commits for today).
Comment #11
jhodgdonThanks! Committed to 8.x and 7.x.