Since https://drupal.org/node/1229198 is closed, I'm starting a separate ticket.

After applying https://drupal.org/files/config_perms-invalid_argument_foreach-1229198-5... you will still receive a slew of notices like these when you do a cache clear:

Notice: Trying to get property of non-object in config_perms_menu_alter() (line 109 of /Users/bwood/code/drupal/bwood/openberkeley-drops-7/profiles/openberkeley/modules/contrib/config_perms/config_perms.module).

Warning: Invalid argument supplied for foreach() in
config_perms_menu_alter() (line 109 of
/Users/bwood/code/drupal/bwood/openberkeley-drops-7/profiles/openberkeley/modules/contrib/config_perms/config_perms.module).

You will see these messages on 'drush cc all' or if you are including config_perms in an install profile, you'll see these messages on the screen after you click the "Visit your new site" link in the final task of your install process.

This simple patch fixes the cache clear problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bwood’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
759 bytes
mlncn’s picture

Status: Needs review » Reviewed & tested by the community

Yes, this fixes the stream of:

Invalid argument supplied for foreach() config_perms.module:109 [warning]
Invalid argument supplied for foreach() config_perms.module:109 [warning]

And the patch makes sense.

mlncn’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Actually this is a duplicate of #2177151: Invalid data structure when retrieving config from the cache, and the patch there (which works effectively the same) has a bit more inline comments explaining what is happening. Closing this as duplicate in favor of that, now also marked RTBC.