Query: A little bug fix for you.
-
Thank you for this nice plugin.
In debug mode my category query created an error on your line 440 — your reorder terms routine didn’t find an expected object[0]. Well, in the bar dump I saw that there is no item 0, just a list of various other iDs.
I fixed the problem. I changed !is_object($objects[0]) to !is_objects(reset($objects))
See below.
I hoe you can validate my fix and update when you have a chance.
Cheers!
function reorder_terms( $objects ) { // we do not need empty objects if ( empty( $objects ) ) return $objects; // do not apply ordering to list that contains just names if ( !is_object( reset($objects) ) ) return $objects;
https://www.ads-software.com/plugins/simple-custom-post-order/
- The topic ‘Query: A little bug fix for you.’ is closed to new replies.