• Resolved benfreke

    (@benfreke)


    Hi

    When you use the orderby query var to sort by a custom meta field, the function relevanssi_object_sort() throws a notice. Line 44 and line 45 will throw a notice as the key is undefined (the data object is only the post).

    I just put a quick check in above the for loop (line 40) that returns if the key isn’t set on the first data element.

    if (!isset($data[0]) || !isset($data[0]->$key)) { return; }

    Could you please make this part of the next upgrade for the free version, so my code doesn’t get over-written when we upgrade the plugin next?

    http://ww.wp.xz.cn/extend/plugins/relevanssi/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Bug with object sort’ is closed to new replies.