Skip to content
Snippets Groups Projects
Unverified Commit c8ceeb02 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Import: prevent empty keys

parent 76158cac
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,7 @@ class ElementImportMappingService
private function collectKey($key, $parentKey = null) {
if (in_array($key, ['__initializer__', '__cloner__', '__isInitialized__'])) return;
$keyName = $parentKey ? $parentKey . '/' . $key : $key;
if (!$keyName || strlen($keyName) == 0) return;
if (!in_array($keyName, $this->allNewFields)) $this->allNewFields[] = $keyName;
if (!array_key_exists($keyName, $this->ontologyMapping)) {
$keyLower = str_replace('_', '', strtolower($key));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment