cmdb.category.create gibt deprecation warning und runtimeexception
frisbee23 opened this issue · comments
ich mach category->read(..)
und bekomme ein leeres array,also mache ich
category->create(...)..
dabei tritt folgender fehler auf..
ich wollte das nur grob melden, zu deiner information;
ich werd mal schauen das ich die exception abfange und einfach weitermache..
gruesse,
PK
Expected behavior
creating the group membership category
Actual behavior
PHP Fatal error: Uncaught RuntimeException: Bad result: Category entry was already existing and has been updated. [This method is deprecated und will be removed i
n a feature release. Use 'cmdb.category.save' instead.] in /var/www/itservices/ois/vendor/bheisig/idoitapi/src/CMDBCategory.php:104
Stack trace:
#0 /var/www/itservices/ois/idoit-syncdoc.php(399): bheisig\idoitapi\CMDBCategory->create(148915, 'C__CATG__GROUP_...', Array)
Steps to reproduce the behavior
Environment
Question | Answer |
---|---|
bheisig/idoitapi version | 0.7 |
PHP version | 7.2 |
i-doit version | 1.12.1 mit hotfixes fuer api open/pro |
i-doit API add-on version | latest |
Server logs
Excerpt taken from /var/log/apache2/error.log
:
Paste logs
Excerpt taken from /var/www/html/i-doit/log/api_*.log
:
Paste logs
Sorry for the late response. Can you please provide a minimal example as source code to reproduce this behavior?
You can avoid this deprecated method by using CMDBCategory::save()
instead.
I close this issue. If there's still a problem please re-open it. Thanks.