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

Fixed ErrorException: [E_NOTICE] Trying to get property of non-object src/XF/Admin/Controller/Import.php:22

Affected version
RC2

Lemminator

Well-known member
#1
Stack trace
#0 src/XF/Admin/Controller/Import.php(22): XF::handlePhpError(8, 'Trying to get p...', '/kunden/543495_...', 22, Array)
#1 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Import->actionIndex(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'index', 'html', Object(XF\Mvc\ParameterBag), 'importData', Object(XF\Admin\Controller\Import), NULL)
#3 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(1863): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 admin.php(13): XF::runApp('XF\\Admin\\App')
#7 {main}Request state
array(4) {
["url"] => string(18) "/admin.php?import/"
["referrer"] => string(58) "http://test.elnino-online-gaming.de/admin.php?user-groups/"
["_GET"] => array(1) {
["import/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 

Chris D

XenForo developer
Staff member
#2
This and your previous bug report are suspiciously similar and they shouldn't really be happening. This is line 22:
PHP:
$importer = $manager->getImporter($session->importerId);
Neither $manager or $session should ever be a non-object as far as I can work out. It's certainly nothing I can reproduce, anyway.

Do you have any add-ons installed? If you disable them all, does the issue change? Aside from your other bug report, is there any other errors at all? Any errors under Tools > File health check?
 

Lemminator

Well-known member
#3
i have delete the old Add-Ons from Xf1

the only new Add-ons are the Ressource Manager and Media Gallery.

File health check was good, all files ok
 

Mike

XenForo developer
Staff member
#6
I'm about 99% sure that there was a remnant of an XF1 import here -- if the import was never "completed" (in the importer UI), there would still be an open import session and XF2 was picking that up. I've added protection against this case (and wipe out the now-unusable session when upgrading to XF2).