@@ -81,9 +81,13 @@ |
||
| 81 | 81 | $listItem = $manager->createListItem()->setPosition( $idx )->fromArray( $data ); |
| 82 | 82 | $refItem = $manager->create()->fromArray( $data ); |
| 83 | 83 | |
| 84 | - try { |
|
| 84 | + try |
|
| 85 | + { |
|
| 85 | 86 | $refItem = $manager->find( $refItem->getCode(), [], $item->getResourceType(), $refItem->getType() ); |
| 86 | - } catch( \Exception $e ) { ; } // if not found, use the new item |
|
| 87 | + } |
|
| 88 | + catch( \Exception $e ) |
|
| 89 | + { |
|
| 90 | +; } // if not found, use the new item |
|
| 87 | 91 | |
| 88 | 92 | $refItem = $this->addRefItems( $refItem, $data ); |
| 89 | 93 | $item->addListItem( 'attribute', $listItem, $refItem ); |