Feat: Upgrading Lunar to 1.5
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Modules\Core\MigrateImport\JudgeMe;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class JudgeMeCsvReader
|
||||
{
|
||||
/**
|
||||
@@ -12,7 +14,7 @@ class JudgeMeCsvReader
|
||||
$handle = fopen($csvPath, 'r');
|
||||
|
||||
if ($handle === false) {
|
||||
throw new \RuntimeException("Could not open CSV file: {$csvPath}");
|
||||
throw new RuntimeException("Could not open CSV file: {$csvPath}");
|
||||
}
|
||||
|
||||
$headers = fgetcsv($handle);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Modules\Core\MigrateImport\JudgeMe;
|
||||
|
||||
use Throwable;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Modules\Core\MigrateImport\Importer;
|
||||
@@ -75,7 +76,7 @@ class JudgeMeExportImporter implements Importer
|
||||
foreach ($urls as $url) {
|
||||
try {
|
||||
$review->addMediaFromUrl($url)->toMediaCollection(ProductReview::IMAGES_COLLECTION);
|
||||
} catch (\Throwable $e) {
|
||||
} catch (Throwable $e) {
|
||||
Log::warning('JudgeMe import: failed to download review image', [
|
||||
'review_id' => $review->id,
|
||||
'url' => $url,
|
||||
|
||||
Reference in New Issue
Block a user