1
0
mirror of synced 2024-11-22 21:36:10 +03:00

fix ICML Loading - check if is an array

This commit is contained in:
m.korolev 2014-01-30 15:54:49 +04:00
parent 98ad65413c
commit 5c1917a8e8

View File

@ -26,32 +26,40 @@ foreach ($iblockProperties as $prop) {
$skuUnitProps = ('IBLOCK_PROPERTY_UNIT_SKU' . "_" . $prop); $skuUnitProps = ('IBLOCK_PROPERTY_UNIT_SKU' . "_" . $prop);
$skuUnitProps = $$skuUnitProps; $skuUnitProps = $$skuUnitProps;
if (is_array($skuUnitProps)) {
foreach ($skuUnitProps as $iblock => $val) { foreach ($skuUnitProps as $iblock => $val) {
$IBLOCK_PROPERTY_UNIT_SKU[$iblock][$prop] = $val; $IBLOCK_PROPERTY_UNIT_SKU[$iblock][$prop] = $val;
} }
}
$skuProps = ('IBLOCK_PROPERTY_SKU' . "_" . $prop); $skuProps = ('IBLOCK_PROPERTY_SKU' . "_" . $prop);
$skuProps = $$skuProps; $skuProps = $$skuProps;
if (is_array($skuProps)) {
foreach ($skuProps as $iblock => $val) { foreach ($skuProps as $iblock => $val) {
$IBLOCK_PROPERTY_SKU[$iblock][$prop] = $val; $IBLOCK_PROPERTY_SKU[$iblock][$prop] = $val;
} }
} }
}
$IBLOCK_PROPERTY_PRODUCT = array(); $IBLOCK_PROPERTY_PRODUCT = array();
$IBLOCK_PROPERTY_UNIT_PRODUCT = array(); $IBLOCK_PROPERTY_UNIT_PRODUCT = array();
foreach ($iblockProperties as $prop) { foreach ($iblockProperties as $prop) {
$productUnitProps = "IBLOCK_PROPERTY_UNIT_PRODUCT" . "_" . $prop; $productUnitProps = "IBLOCK_PROPERTY_UNIT_PRODUCT" . "_" . $prop;
$productUnitProps = $$productUnitProps; $productUnitProps = $$productUnitProps;
if (is_array($productUnitProps)) {
foreach ($productUnitProps as $iblock => $val) { foreach ($productUnitProps as $iblock => $val) {
$IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock][$prop] = $val; $IBLOCK_PROPERTY_UNIT_PRODUCT[$iblock][$prop] = $val;
} }
}
$productProps = "IBLOCK_PROPERTY_PRODUCT" . "_" . $prop; $productProps = "IBLOCK_PROPERTY_PRODUCT" . "_" . $prop;
$productProps = $$productProps; $productProps = $$productProps;
if (is_array($productProps)) {
foreach ($productProps as $iblock => $val) { foreach ($productProps as $iblock => $val) {
$IBLOCK_PROPERTY_PRODUCT[$iblock][$prop] = $val; $IBLOCK_PROPERTY_PRODUCT[$iblock][$prop] = $val;
} }
} }
}
$loader = new ICMLLoader(); $loader = new ICMLLoader();