-
Incident report
-
Resolution: Fixed
-
Major
-
2.1.7
When I try to import the attached host from 1.8 to 2.2, a bunch of errors are displayed:
Invalid argument supplied for foreach() [conf.import.php:130 ? CConfigurationImport->import() ? CXmlImport18::parseMain() ? CAPIObject->massAdd() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CTemplate->massAdd() ? CHostGeneral->link() in /opt/lampp/htdocs/zabbix/trunk/frontends/php/api/classes/CHostGeneral.php:144]
Invalid argument supplied for foreach() [conf.import.php:130 ? CConfigurationImport->import() ? CXmlImport18::parseMain() ? CAPIObject->massAdd() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CTemplate->massAdd() ? CHostGeneral->link() in /opt/lampp/htdocs/zabbix/trunk/frontends/php/api/classes/CHostGeneral.php:171]
Invalid argument supplied for foreach() [conf.import.php:130 ? CConfigurationImport->import() ? CXmlImport18::parseMain() ? CAPIObject->massAdd() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CTemplate->massAdd() ? CHostGeneral->link() in /opt/lampp/htdocs/zabbix/trunk/frontends/php/api/classes/CHostGeneral.php:193]
If that host already exists: an additional error is displayed:
Undefined index: inventory [conf.import.php:130 ? CConfigurationImport->import() ? CXmlImport18::parseMain() ? CAPIObject->update() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CHost->update() in /opt/lampp/htdocs/zabbix/trunk/frontends/php/api/classes/CHost.php:947]
The same happens with templates. Works correctly in 2.0.