Skip to content
Advertisement

Object of class stdClass could not be converted to string

I am having a problem with PHP at the moment, I am getting this error,

Object of class stdClass could not be converted to string the error occurs when I run this portion of code in my site,

JavaScript

The line in which the error is occuring is this one,

JavaScript

And this line is calling this function,

JavaScript

I don’t really now what this problem is, so any help would be great.

Advertisement

Answer

Most likely, the userdata() function is returning an object, not a string. Look into the documentation (or var_dump the return value) to find out which value you need to use.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement