fix: pass param to call function `remove_compound_value`
This commit is contained in:
parent
7b3444efc1
commit
3288ea2b81
|
@ -900,7 +900,7 @@ class CSV extends Importer {
|
||||||
$compound_item_metadata_value = $this->is_assoc($compound_item_metadata_value) ? [$compound_item_metadata_value] : $compound_item_metadata_value;
|
$compound_item_metadata_value = $this->is_assoc($compound_item_metadata_value) ? [$compound_item_metadata_value] : $compound_item_metadata_value;
|
||||||
foreach($compound_item_metadata_value as $item_metadata_value) {
|
foreach($compound_item_metadata_value as $item_metadata_value) {
|
||||||
foreach ($item_metadata_value as $itemMetadata) {
|
foreach ($item_metadata_value as $itemMetadata) {
|
||||||
$Tainacan_Item_Metadata->remove_compound_value($item, $compound_metadata, $itemMetadata->get_parent_meta_id());
|
$Tainacan_Item_Metadata->remove_compound_value($itemMetadata->get_parent_meta_id());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,7 +212,7 @@ class CompoundMetadatumTypes extends TAINACAN_UnitTestCase {
|
||||||
$this->assertEquals( 'Green', $compoundValue[1][$metadatum_child1->get_id()]->get_value() , 'First element of value should have "Red" value' );
|
$this->assertEquals( 'Green', $compoundValue[1][$metadatum_child1->get_id()]->get_value() , 'First element of value should have "Red" value' );
|
||||||
$this->assertEquals( 'Yellow', $compoundValue[1][$metadatum_child2->get_id()]->get_value() , 'Second element of value should have "Blue" value' );
|
$this->assertEquals( 'Yellow', $compoundValue[1][$metadatum_child2->get_id()]->get_value() , 'Second element of value should have "Blue" value' );
|
||||||
|
|
||||||
$item_metadata_removed = $Tainacan_Item_Metadata->remove_compound_value($i, $metadatum, $item_metadata3->get_parent_meta_id());
|
$item_metadata_removed = $Tainacan_Item_Metadata->remove_compound_value($item_metadata3->get_parent_meta_id());
|
||||||
$compoundItem = new Item_Metadata_Entity($i, $metadatum);
|
$compoundItem = new Item_Metadata_Entity($i, $metadatum);
|
||||||
$compoundValue = $compoundItem->get_value();
|
$compoundValue = $compoundItem->get_value();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue