Warning: Invalid argument supplied for foreach() in _rootcandy_besturlmatch() (line 268 of
/sites/all/themes/rootcandy/template.php).
Warning: Invalid argument supplied for foreach() in rootcandy_links__rc_main_navigation() (line 142 of /sites/all/themes/rootcandy/template.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sign’s picture

Status: Active » Postponed (maintainer needs more info)

Can't reproduce,
can you give me some more info?
What links if any, etc...?

B-Prod’s picture

Title: Warning Invalid argument RC-D7-DEV » Empty navigation menu causes issues in the theme function
Status: Postponed (maintainer needs more info) » Needs review
FileSize
766 bytes

In the function rootcandy_preprocess_page(), the $rootcandy_navigation variable may be an empty string, according to the stored settings.
If so, this empty string is passed to the theme links__rc_main_navigation and causes issue in the rootcandy_links__rc_main_navigation() function, that does not take care of such case and always expects an array of links.

jhr’s picture

I was getting the same warnings. Used #2 patched, no more warnings.

B-Prod’s picture

Status: Needs review » Reviewed & tested by the community

Set issue as RTBC, according to jhr.