XF 2.1 Attempted to convert NULL to integer [user_id] src/XF/Mvc/Entity/Entity.php:740

DaveL

Well-known member
Just started to get a lot of these errors in my server error logs. I did have a search, but it seemed that it should have been resolved ages ago, so at a bit of a loss.

Any help greatly appreciated.

Code:
    InvalidArgumentException: Attempted to convert NULL to integer [user_id] src/XF/Mvc/Entity/Entity.php:740

    Generated by: Unknown account 22 May 2020 at 17:30

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'user_id', 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('user_id', NULL)
#2 src/addons/Andy/WelcomeThread/XF/Cron/WelcomeThread.php(120): XF\Mvc\Entity\Entity->__set('user_id', NULL)
#3 [internal function]: Andy\WelcomeThread\XF\Cron\WelcomeThread::runWelcomeThread(Object(XF\Entity\CronEntry))
#4 src/XF/Job/Cron.php(34): call_user_func(Array, Object(XF\Entity\CronEntry))
#5 src/XF/Job/Manager.php(253): XF\Job\Cron->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}

-------------

Previous InvalidArgumentException: Attempted to convert NULL to integer - src/XF/Mvc/Entity/ValueFormatter.php:141
#0 src/XF/Mvc/Entity/Entity.php(736): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'user_id', 2, Array)
#2 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('user_id', NULL)
#3 src/addons/Andy/WelcomeThread/XF/Cron/WelcomeThread.php(120): XF\Mvc\Entity\Entity->__set('user_id', NULL)
#4 [internal function]: Andy\WelcomeThread\XF\Cron\WelcomeThread::runWelcomeThread(Object(XF\Entity\CronEntry))
#5 src/XF/Job/Cron.php(34): call_user_func(Array, Object(XF\Entity\CronEntry))
#6 src/XF/Job/Manager.php(253): XF\Job\Cron->run(G)
#7 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#8 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#9 job.php(42): XF\Job\Manager->runQueue(false, 8)
#10 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(66) "https://www.airportcitygame.com/threads/land-expansion-cost.16352/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

Brogan

XenForo moderator
Staff member
Looks like an issue with a third party add-on - Andy/WelcomeThread.

You will need to post in the resource thread for support.
 

DaveL

Well-known member
Looks like an issue with a third party add-on - Andy/WelcomeThread.

You will need to post in the resource thread for support.
Hi Brogan,
Many thanks for your quick response. Had that add-on for at least a year with no issues. @AndyB , are you aware of what might be causing this?
Thanks again.
 

DaveL

Well-known member
@AndyB , this is v1.8 of the welcome thread add-on. I've had to disable it for now as was get pages of the above warnings.
 
Top