I've went to admin/build/modules and I've got following error:
Fatal error: Unsupported operand types in D:\bro\workspace\Websites\XComKids\trunk\sites\all\modules\contributions\content_profile\content_profile.module on line 75
Line 75:
$item = array(
'page callback' => 'content_profile_page_edit',
'page arguments' => array($type, 1),
'access callback' => 'content_profile_page_access',
'access arguments' => array($type, 1),
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
) + $item;
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | array_operand.patch | 898 bytes | monan |
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