Hi!

If we click on the post date of a statuses entry we will get the following error (PHP) message...

Fatal error: Cannot use object of type stdClass as array in /.../sites/all/modules/statuses/includes/statuses.preprocess.inc on line 142

Wr
Paulap

Comments

mathankumarc’s picture

Status: Active » Postponed (maintainer needs more info)

Could you please provide the step to reproduce the issue?

I think the problem with statuses links. hook_links was removed in D7. I'm not sure about the issue, however we need to fix hook_links.

icecreamyou’s picture

Priority: Critical » Major

I can't reproduce this issue on a mostly clean installation.

The error is probably because some other module has an incompatible hook_link() implementation. Statuses uses hook_link() the way it was used in Drupal 6 even though core doesn't use it any more. You should try to grep for other implementations in your modules directory to help us find the culprit. My first thought was the Link module but that doesn't seem to be it.

The main thing we can do in statuses is to rename the hook. As far as I know there are no other modules using it to interact with statuses so we could just rename it to hook_statuses_link() (we're already using hook_statuses_link_alter()). We would need to change the invocation, implementation, and documentation in this case.

liliplanet’s picture

Thank you Icecreamyou.

The error only happened once upgraded to the latest version. Had to revert to statuses 7.x-1.0-unstable4

icecreamyou’s picture

There are no changes between unstable4 and beta1 that should be related to this. I would think you'd get the exact same issue with beta4. The error you're reporting is that the items in an array the module is trying to sort are objects instead of arrays, but there is no place in Statuses where those list items are defined as anything other than arrays. The error must be coming from another module, maybe one that was upgraded at the same time as Statuses?

icecreamyou’s picture

We need more information in order to address this issue. If this problem is due to a module conflict, we need to know that so we can change the name of our hook_link(). If a conflict isn't the cause, I don't know what could be causing this.

icecreamyou’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)