Closed ansonphong closed 11 years ago
OK on testing, this is happening again. We should fix this somehow. Here is the error which makes it apparent, in addition to the function not returning normally.
Warning: in_array() expects parameter 2 to be array, object given in /Users/phong/Projects Clients/Reality Sandwich/_WEB/RSV2/WORDPRESS/wp-content/plugins/postworld/php/postworld_users.php on line 745
Here is another example of corrupted object.
{"viewed":[],"favorites":{"1":176466,"2":176363,"3":176241,"4":175925},"view_later":[176967,176721,176595]}
You can see it's localized to a single sub-object and isn't effecting the whole object, just the one which is being set.
Issue Solved.
Hi Haidy, I've been working with
set_post_relationship()
and all of the sudden it gives me an error about "get_post_relationship" expecting an array. So I looked at the database field, and I can see it's randomly been written as a serialized object, as you can see.It's working most of the time, and then suddenly it did this.
I haven't had that issue since (it only happened once) though I had to totally reset it.
I don't expect that you'll try to troubleshoot this, since I don't know how to re-create it, although do you have any ideas why this could be happening?