Hi,

I tried to add a new form (user registration form) for mollom to protect and got the following error:
Fatal error: Unsupported operand types in /home/whackkc1/public_html/sites/default/modules/mollom/mollom.admin.inc on line 215

I get the same error on trying to configure the settings for my comment form.

Comments

webfunkin’s picture

Title: Fatal error on adding new forms or configuring new forms » Fatal error on adding new forms or configuring forms
sun’s picture

Title: Fatal error on adding new forms or configuring forms » PHP error on adding new forms or configuring forms
Component: Miscellaneous » Code
Category: bug » support
Status: Active » Postponed (maintainer needs more info)

That's this line:

        $all_permissions += $module_permissions;

This would mean that a module implements hook_perm(), but returns either nothing or something that is incompatible with Drupal 6's APIs.

Can you try to put the following line right above that line?

        echo "<pre>"; var_dump($module, $module_permissions); echo "</pre>\n";

and try to add/edit a form again? That will print each module name + its returned permissions on the screen. For one or more modules, the output should look differently than all the other - and we're interested in that output.

If that's too much for you, can you provide a list of modules you have enabled?

webfunkin’s picture

Here you go :

string(9) "pollfield"
bool(false)

Fatal error: Unsupported operand types in /home/whackkc1/public_html/sites/default/modules/mollom/mollom.admin.inc on line 216
sun’s picture

Title: PHP error on adding new forms or configuring forms » PHP error on administrative protection form if Pollfield module is installed
Version: 6.x-1.15 » 6.x-1.x-dev
Category: support » bug
Priority: Normal » Minor
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new2.87 KB

So pollfield is guilty. I've looked for an existing bug report about it, and re-opened the Pollfield issue #624432: Pollfield module permissions WTF

However, both modules could be smarter here, so while we're waiting for pollfield to be fixed, we can additionally account for this in the Mollom module.

webfunkin’s picture

Alright thanks. I guess I will disable pollfield as of now. Was using it to test some different functionality.

dries’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

Committed to CVS HEAD. Should probably be ported to D7.

sun’s picture

Status: Patch (to be ported) » Fixed
StatusFileSize
new2.13 KB

Thanks for reporting, reviewing, and testing! Committed to HEAD.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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

  • Commit 993325a on master, fai6, 8.x-2.x, fbajs, actions by sun:
    #963134 by sun: Fixed PHP error on administrative protection form if...

  • Commit 993325a on master, fai6, 8.x-2.x, fbajs, actions by sun:
    #963134 by sun: Fixed PHP error on administrative protection form if...