the function causes an error on line 148-149 of simple_access.module if the user doesn't have access permissions to the module:

 $simple_access_form = simple_access_form($form['#node']);
 $form = array_merge($form, $simple_access_form);

because the simple_access_form function returns null so the array_merge barfs.

You could solve it by returning array() from simple_access_form on the last line (i.e., if perms are inadequate for the module), or by replacing the above lines with:

 if ($simple_access_form = simple_access_form($form['#node']))
    $form = array_merge($form, $simple_access_form);

Comments

bomarmonk’s picture

Nice save-- I was just about to rebuild my entire access table because of this bug... I thought I had corrupted my node_access settings. I can definitely confirm this bug (in the 4.7 version as well) and confirm that replacing lines 148-149 patches the issue. Please commit this patch (I don't know if there is a better fix, but this is better than having a broken module).

Robrecht Jacques’s picture

Version: master » 4.7.x-1.x-dev

Fixed in CVS:
Commit #34876 by gordon
Simple Access: /modules/simple_access/simple_access.module 1.19

Is not yet fixed in 4.7, so setting version to 4.7.0!

gordon’s picture

Status: Reviewed & tested by the community » Fixed

I have backported this to cvs.

Anonymous’s picture

Status: Fixed » Closed (fixed)