Not a bug Attempt to read property "custom_fields" on null

Robert9

Well-known member
Affected version
newest
ErrorException: [E_WARNING] Attempt to read property "custom_fields" on null in src/XF/Criteria/User.php at line 17

  1. XF::handlePhpError() in src/XF/Criteria/User.php at line 17
  2. XF\Criteria\User->isSpecialMatched() in src/XF/Criteria/AbstractCriteria.php at line 44
  3. XF\Criteria\AbstractCriteria->isMatched() in src/XF/Repository/UserGroupPromotion.php at line 111
  4. XF\Repository\UserGroupPromotion->updatePromotionsForUser() in src/XF/Job/UserGroupPromotion.php at line 60
  5. XF\Job\UserGroupPromotion->run() in src/XF/Job/Manager.php at line 260
  6. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 202
  7. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 86
  8. XF\Job\Manager->runQueue() in src/XF/Admin/Controller/Tools.php at line 141
  9. XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 352
  10. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  11. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  12. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  13. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2353
  14. XF\App->run() in src/XF.php at line 524
  15. XF::runApp() in admin.php at line 13
 
This would seem to imply you have a user without a corresponding profile record. You might be able to correct this by running:

SQL:
INSERT IGNORE INTO xf_user_profile (user_id) SELECT user_id FROM xf_user;
 
Back
Top Bottom