I'm not sure that this function needs to still exist, and if it does then it shouldn't remain a floating utility function. For now, however, it needs to be adjusted to check both the menu_router table and the new router system for legal paths, since legal paths could live in both for the moment.
I'm not sure if this belongs in the menu system component or routing system component, so flagging for menu for now.
|PASSED: [[SimpleTest]]: [MySQL] 52,521 pass(es).|
|FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed to login to test site.|
|FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in core/modules/system/system.install.|