Commit a676df05 by halweg

fix : fix base image 判空

parent 5b3b07c7
......@@ -55,6 +55,16 @@ class ProductFirstImageAsBaseFixer extends Command
$output->writeln('first image' . $firstImage);
$output->writeln("main image".$mainImage);
if (empty($firstImage)) {
$output->writeln('first image is null, break');
return;
}
if (empty($mainImage)) {
$output->writeln('base image is null, break');
return;
}
if ($mainImage != $firstImage) {
$output->writeln('fix product ' . $mainImage . ' product id: ' . $productId);
//change main image
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment