Closed (fixed)
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
User registration module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jan 2009 at 13:54 UTC
Updated:
29 Mar 2010 at 20:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
kenorb commentedIn content_profile_menu_alter()
Comment #2
kenorb commentedProbably it's because some module called menu_alter hook with different arguments.
And content profile getting $items['user/%user_category/edit/'. $type] variable without checking what was passed through.
I don't know if this can stay like that or there should be some changes done in the code.
Comment #3
fagohm, usually this has to work. Why should another module call menu_alter again with different arguments? That sounds bad. Can you reproduce this with a clean drupal install + content profile? If not, try to identify the module causing the problem once activated.
Comment #4
kenorb commentedComment #5
halfiranian commentedAny more news on this error? When I go to the register page I get this:
Fatal error: Unsupported operand types in /XXX/sites/all/modules/content_profile/modules/content_profile_registration.module on line 185
I'll try and see what module is causing it but any pointers appreciated!
Comment #6
halfiranian commentedit was vertical tabs module doing this for me, in case others want to know
Comment #7
monan commentedI'm seeing this error as well on one of the sites I'm currently working on:
Fatal error: Unsupported operand types in /XXX/sites/all/modules/content_profile/modules/content_profile_registration.module on line 186 (this is function content_profile_registration_alter_weights()).
This occurs when trying to go to the /user/register screen.
PHP version: PHP 5.2.4-2ubuntu5.6 with Suhosin-Patch 0.9.6.2
This looks similar to the problem mentioned at: http://drupal.org/node/180137.
My fix is to move away from the '+=' operand here:
$elements[$key] += array('#weight' => 0);
and, instead, rely on an equivalent:
array_push($elements[$key], array('#weight' => 0));
This fixes the problem.
Patch is included...
Thanks!
Comment #8
monan commentedSorry... Didn't update the issue flags... See comment #7 for what these flags apply to...
Comment #9
fagohm, that code is not equivalent. Anyway I improved the code by adding an additional check, so the errors should be fixed now.
Comment #10
monan commentedWhoops... Got me there... I guess it was pretty late... Thanks!
Comment #12
jamesmcd commentedHave the amendments been applied to the latest stable release?
I'm using version 6.x-1.0-beta4 and I've just had the error come up as as described by monan in #7
If they have not been applied, should I go ahead and use the dev version?
Comment #13
lyricnz commentedjamescmd: beta4 is from June 15, and it looks like fago fixed it in August. Until a new release is made, either use the dev release, or apply this change manually
http://drupalcode.org/viewvc/drupal/contributions/modules/content_profil...
Comment #14
skizzo commentedI am using 6.x-1.x-dev (2010-01-13) but I am still getting the following (apparently harmless) error on drush update some-other-module
Fatal error: Unsupported operand types in /var/www/drupal/sites/all/modules/content_profile/content_profile.module on line 80Comment #15
kewlguy commented#skizzo:
I believe there is some discussion and a patch for using Drush to update modules and then getting this error.
Check it out here