With : "Assign from Path", i have the following error :

warning: in_array() expects parameter 2 to be array, null given in D:\wamp\www\my_site\sites\all\modules\users\autoassignrole\autoassignrole.module on line 461.

To fix : Change line 461 :
if (in_array($rid, content_profile_get_settings($type, 'autoassignrole_use'))) {
by
if (in_array($rid, array(content_profile_get_settings($type, 'autoassignrole_use')))) {

It works after for me. Tell me if not.

Comments

afox’s picture

Assigned: Unassigned » afox
Status: Patch (to be ported) » Needs review
StatusFileSize
new709 bytes

Looks good. Here's a proper patch made for 6.x-1.2. It should work for 2.0 also.
Someone please check if this works with 2.0 and mark as RTBC.

Status: Needs review » Needs work

The last submitted patch, autoassign_patch_110205.patch, failed testing.

drOptimum’s picture

Hi,

Changing the line 461 to

if (in_array($rid, array(content_profile_get_settings($type, 'autoassignrole_use')))) {

solved the problem in my case.

gateway69’s picture

I can confirm that #3 fixes the issue.. yet another php 5.3 issue

afox’s picture

Status: Needs work » Needs review
StatusFileSize
new656 bytes

Here's a new patch for 2.0-beta1. Not tested, but should work as it's basically the same as for 1.2.

Status: Needs review » Needs work

The last submitted patch, autoassignrole_afox.patch, failed testing.

afox’s picture

StatusFileSize
new652 bytes

Let's try this again...

mike.davis’s picture

Issue summary: View changes
Status: Needs work » Needs review

Changed status for test bot

Status: Needs review » Needs work

The last submitted patch, 7: autoassignrole.module.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: autoassignrole.module.patch, failed testing.

mike.davis’s picture

Status: Needs work » Fixed

This has been committed now.

  • mike.davis committed 93fc08b on 6.x-2.x
    Issue #1025668 by afox: Fix for error appearing on new path page.
    

Status: Fixed » Closed (fixed)

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