Download & Extend

Object of class stdClass could not be converted to string

Project:Related links
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

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

#1

same in 5.x-2.2beta

Any ideas or workarounds?

#2

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

#3

subscribe

#4

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.

#5

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 request» bug report

#6

Status:active» closed (duplicate)

Dupe of #133099: Object of class stdClass could not be converted to string

nobody click here