From my log:

?q=admin/troll
Message array_merge() [function.array-merge]: Argument #2 is not an array in ~/celticess.net/modules/troll/troll.module on line 383.

This seems to happen whenever I click on troll in the admin settings.

Line 383 of the module is top line in the following:

	$pager = theme('pager', NULL, 25, 0, array_merge(tablesort_pager(), $edit));

	if (!empty($pager)) {
		$rows[] = array(array('data' => $pager, 'colspan' => 5));
	}

I'm using Drupal 4.6.4 and the latest stable troll module listed for 4.6. Despite the error the info page for Troll looks fine. It shows a search users box and a listing of users below that. As well as it having the ban ip tab. So I'm wondering if this is just a harmless bug that doesn't really affect functionality.

CommentFileSizeAuthor
#3 troll.module18.57 KBCromicon

Comments

Cromicon’s picture

Additional information:
I tested this module with 4.7 beta 3 and it was fine, yet on 4.6.5 this problem occurs.

tgorg.com’s picture

This seems to work...

Change this (line 383)

$pager = theme('pager', NULL, 25, 0, array_merge(tablesort_pager(), $edit));

To this...

if ($edit != '')
{
      $pager = theme('pager', NULL, 25, 0, array_merge(tablesort_pager(), $edit));
}

Would this be good? I am pretty new to drupal and php...

Cromicon’s picture

StatusFileSize
new18.57 KB

Yep that appears to work great. I can't figure out how this cvs stuff works but if anyone is interested the fix to the array merge error and the correct IP address detection is in the attached file. If someone whould be kind enough to add it properly to the release candidate that would be great.

Cromicon’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)