afa před 9 měsíci
rodič
revize
4396a02abf
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      application/admin/controller/product/Lists.php

+ 2 - 2
application/admin/controller/product/Lists.php

@@ -251,9 +251,9 @@ class Lists extends Backend
                 //列字段
                 for ($currentColumn = 2; $currentColumn <= 5; $currentColumn++) {
                     $val = $currentSheet->getCellByColumnAndRow($currentColumn, $currentRow)->getValue();
-                    if(is_null($val)) continue;
-                    $values[] = $val;
+                    $values[] = is_null($val) ? '' : $val;
                 }
+                if(empty($values)) continue;
                 $field =  implode('-', $values);
                 $row = $importregion::where('name', $field)->find();
                 if(!empty($row)){