aldolat / posts-in-sidebar

Publish a list of posts in your sidebar
https://dev.aldolat.it/projects/posts-in-sidebar/
GNU General Public License v3.0
16 stars 8 forks source link

Update pis-functions.php to avoid erroring #33

Closed petersuba closed 7 years ago

petersuba commented 7 years ago

When dealing with taxonomies, PIS expects to receive a valid set of taxonomy details to work with. However, for sites which use CPT-onomies, there is a long outstanding bug which populates term cache in WP 4.7.2 and above with NULLs, hence when PIS touches such a Post, as it wasn't expecting a NULL it would cause to error out and the page with the post on would not get properly generated. An additional check for a WP_Error return value is now added to handle this circumstance.

aldolat commented 7 years ago

Thank you!

aldolat commented 7 years ago

@petersuba could you tell me if the "long outstanding bug" is filed in Trac? Do you know the URL?

petersuba commented 7 years ago

Sure.

https://github.com/bamadesigner/cpt-onomies/issues/26

(sorry, not sure how to cross-reference an issue from another project)