I've just enabled Related inks on my news aggregation site, and while it seems to be working, the logs are showing a lot of errors being produced of the form:

Object of class stdClass could not be converted to string in /web/example.com/www/sites/default/modules/relatedlinks/relatedlinks.module on line 1083.

Any advise as to what this might be due to, and how it might be resolved would be gratefully received.

Thanks.

Comments

jackspiv’s picture

same in 5.x-2.2beta

Any ideas or workarounds?

pianomansam’s picture

Started getting the same error in 5.x-2.2beta too :-(

noomz’s picture

subscribe

csc4’s picture

I think it is because it isn't testing for the empty case so I'm trying with an additional if above the original clause

ie

instead of

  if (empty($set1) || empty($set2)) {
    $set = empty($set1) ? $set2 : $set1;
  }

trying

  if (empty($set1) && empty($set2)) {
    $set = array();
  }
  elseif (empty($set1) || empty($set2)) {
    $set = empty($set1) ? $set2 : $set1;
  }

So far my errors seem to be gone.

Zen’s picture

Title: Throwing an error » Object of class stdClass could not be converted to string
Version: 4.7.x-3.1 » 6.x-1.x-dev
Category: support » bug
Zen’s picture

Status: Active » Closed (duplicate)