DSF
Well-known member
I get this error for a xf-Cron
Fatal error: Using $this when not in object context in .......
What is wrong her?
I can't find the error
Fatal error: Using $this when not in object context in .......
What is wrong her?
I can't find the error
PHP:
<?php
class XenForo_CronEntry_TestDeleteThreads
{
public static function runTestDeleteThreads()
{
$deleteDate = strtotime('-24 hours');
$threads = $this -> _getDb() -> fetchAll ("
SELECT * FROM xf_thread
WHERE user_id = 28
AND node_id = 8
AND reply_count = 0
AND last_post_date < ?", $deleteDate);
foreach ($threads AS $thread)
{
$this->getModelFromCache('XenForo_Model_Thread')->deleteThread($thread['thread_id'], 'hard');
XenForo_Helper_Cookie::clearIdFromCookie($thread['thread_id'], 'inlinemod_threads');
}
}
}