• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Improper Array In Fetch Options When Accessing Forum Index


Well-known member
This is for 1.5 Beta 1

When accessing the forum index page, the thread fetch options have an improper array causing the default actions in /XenForo/Model/Thread.php to take place.

The array contained in the fetchoptions is this..
Array ( [0] => last_post_date [1] => DESC )
It should be this...
Array ( [order] => last_post_date [orderDirection] => DESC )
This causes anything using the proper array ($fetchOptions['order']) to error out.
Last edited:

Chris D

XenForo developer
Staff member
This is changed now thank you.

I actually can't get it to "error out" nor have we seen any errors as a result. Actually, despite the mistake, the code works exactly as intended hence why it has gone unnoticed in the testing up to now.

If you are seeing actual errors as a result, this may be down to some other code extending the fetch options code.

Regardless, fixed in Beta 2 and the actual fix is just to specify the order as 'last_post_date'. The descending order direction will happen automatcially if it is not specified.


Well-known member
Yes it is from an add-on extending the fetch options. That's how it was found. Looking for and checking the contents of $fetchOptions['order']. ;)

Thanks for the quick fix!
Last edited: