Banxix
Well-known member
It's better now, thank you. I will test and make a fix.
It's better now, thank you. I will test and make a fix.
Fix reply count factor is always triggered.
Your thread view return null on $thread which should be \XF\Entity\Thread. I'm afraid it is not my addon's fault.
I implement a small fix for you. It check if the $thread is instance of Thread, but since your $thread is null, the auto close is not triggered.
else
{
if (isset($entity->post_date)) {
if ($entity->post_date + (\XF::options()->autoCloseThreadsTimeFactorMinutes * 60) < time())
{
$this->threadStateClosed();
}
}
}
@Banxix I've been able to suppress the error by doing the following:
Editing /Banxix/AutoCloseThreads/XF/Entity/Thread.php line 56 with:
PHP:else { if (isset($entity->post_date)) { if ($entity->post_date + (\XF::options()->autoCloseThreadsTimeFactorMinutes * 60) < time()) { $this->threadStateClosed(); } } }
Fixed a case where entity does not exist (it should always exist)
We use essential cookies to make this site work, and optional cookies to enhance your experience.