$root['path'] does not always exist in domain_nav_menu(), so it gives PHP 5.3+ errors.

I changed:

'page arguments' => array($root['path']),

Into:

'page arguments' => isset($root['path']) ? array($root['path']) : array(),

And this fixed it temporarily.

CommentFileSizeAuthor
#2 1303312-nav-default.patch552 bytesagentrickard

Comments

agentrickard’s picture

Thanks.

agentrickard’s picture

Status: Active » Needs review
StatusFileSize
new552 bytes

Actually, I'm having difficulty replicating this issue. (On PHP 5.3)

What condition triggers this warning?

I could see it happening on initial installation, if the primary domain hasn't been set yet. But otherwise, that value should always be populated.

Here's a patch to test as well.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Ok, it happened after rebuilding the Drupal registry/cache, indeed like it's the first time.

The patch is also a fix, it works.

agentrickard’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Excellent! Thanks for the fast turnaround.

Needs to go into 7.x.2 as well.

agentrickard’s picture

Status: Patch (to be ported) » Fixed

Patch applies cleanly to 7.x.2.

Status: Fixed » Closed (fixed)

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