Closed MatzeKitt closed 4 years ago
Hey @KittMedia - thanks for following up on this! (Just noting for myself later and any others, this relates to your WP.org support forum ticket
I'll test this out and wrap it into the next release, which I had planned for a couple weeks ago but haven't had time to finalize. I will push for it this week.
Oh, you‘re right. I already forgot about this support thread. My bad.
No, it's great! I had gone down a rabbit hole trying to source the problem when you initially posted there, but I think your fix looks like a winner.
Feeds can lead to a non-existing post object. This may result in a Trying to get property 'post_type' of non-object here in line 74, since
is_singular
is not reliable at this moment (see more in the trac ticket #29660).The full error message:
My proposed solution:
Add a check if the post object exists before running
is_singular
.would become: