"warning: Invalid argument supplied for foreach() in .../sites/all/modules/config_perms/config_perms.module on line 112."

108 * Implementation of hook_menu_alter().
109 */
110 function config_perms_menu_alter(&$items) {
111   foreach (config_perms_perms() as $perm) {
112     foreach ($perm->path as $path) {      
113       $items[$path]['access callback'] = 'config_perms_access_callback';
114       $items[$path]['access arguments'] = array($perm);
115     }
116   }

Comments

lpalgarvio’s picture

yup
warning: Invalid argument supplied for foreach() in /config_perms/config_perms.module on line 112.

also, in config_perms.install, the version wasn't updated, so an update never takes place

function config_perms_update_6200() {
 $ret = array();

 $schema = config_perms_schema();
 db_create_table($ret, 'config_perms', $schema['config_perms']);
 config_perms_install_data();
 
 return $ret;
}

if you change that to 6201, and try updating, it will report errors.

and disabling returns error:
warning: Invalid argument supplied for foreach() in /config_perms/config_perms.module on line 111.

and installing returns errors, even if you don't change the version
Fatal error: Unsupported operand types in /config_perms/config_perms.module on line 52

Docc’s picture

K seems the updatefrom 1.x to 2.x doesnt go flawless. Ill check it out ASAP.

rfreij’s picture

Any updates on this?....this error makes this module unusable

rfreij’s picture

enabled http://drupal.org/project/ctools and all is well

lpalgarvio’s picture

Priority: Normal » Critical

enabling Chaos Tools only makes the error disappear from most pages, but not all

it still shows in modules page after submitting for example.

i'm reverting my sites back to beta2.
please give priority to this bug.

Docc’s picture

Version: 6.x-2.0-beta3 » 6.x-2.x-dev

Did you try the dev version? Should be fixed in there. Let me know.
Should be oke with and without ctools.

Docc’s picture

Assigned: Unassigned » Docc
Docc’s picture

Status: Active » Needs review
Docc’s picture

Status: Needs review » Closed (fixed)
ClearXS’s picture

Status: Closed (fixed) » Fixed

Well, I have exactly the same error as before and now running the ultimately recent 6.x-2.0 of Jan 15th 2011.

I'll try uninstalling and installing again, lets see if that helps if this module cleans up the database when uninstalled.

(will edit the result here, but have other things to do now & this procedure costs me hours to fulfill, due to the hundreds of modules on a cpu throttled host account)

Docc’s picture

Status: Fixed » Closed (cannot reproduce)

I installed the module on a clean drupal install without ctools.
Alle all databse entries got inserted on install. Please uninstall the module and install again. That should do it.