Skip to content

Commit

Permalink
fix(migration): prevent $row must be array but bool supplied during i…
Browse files Browse the repository at this point in the history
…nstallation (#241)
  • Loading branch information
joerivanveen authored and EdieLemoine committed May 1, 2024
1 parent 1763ade commit b655806
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Migration/Pdk/PdkDeliveryOptionsMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ private function migrateDeliveryOptions(): void
{
$oldValues = $this->getAllRows(AbstractLegacyPsMigration::LEGACY_TABLE_DELIVERY_SETTINGS);

$oldValues->each(function (array $row) {
$oldValues->each(function ($row) {
if (! is_array($row)) {
return;
}

$cartId = json_decode((string) ($row['id_cart'] ?? ''), true);
$orderId = $this->getDbValue('orders', 'id_order', "id_cart = $cartId");

Expand Down

0 comments on commit b655806

Please sign in to comment.