Fatal error: Cannot use object of type stdClass as array in /var/www/drupal6WHM/sites/all/modules/wordpress_import/wordpress_import.module on line 649

I've glanced at the code, will try to case properly to make this work & update here.

Comments

1kenthomas’s picture

User is an Object here AFAIKT. Are there contexts/times when it will be an Array?

1kenthomas’s picture

Assigned: Unassigned » 1kenthomas

Have code, will post.

1kenthomas’s picture

Status: Active » Needs work
StatusFileSize
new54.81 KB

Very preliminary code-- in case anyone needs it-- I tried to check if array properly (if your php is strict, then it will error on (if_array ($x) && $x['x'] ==... ) when $x is not an array, and then just rewrote everything assuming $x is always an object.

1kenthomas’s picture

Assigned: 1kenthomas » Unassigned

De-self-assigning, as I would need to know how the maintainers want to handle; however, seems to remain a major bug.

lavamind’s picture

Status: Needs work » Fixed

Fixed in 6.x-2.x-dev

The line global $user; in the function was added by mistake.

Thanks!

Status: Fixed » Closed (fixed)

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