Skip to content

Commit

Permalink
Merge pull request #1088 from PrestaShopCorp/fix/upgrade-script-633
Browse files Browse the repository at this point in the history
Fixing errors in update script 1.6.1.X
  • Loading branch information
Matt75 authored Jul 12, 2023
2 parents fd32611 + 9c14282 commit 89e88ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions upgrade/upgrade-6.3.3.0.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function upgrade_module_6_3_3_0($module)
foreach (Shop::getShops(false, null, true) as $shopId) {
$currentPosition = isset($maxPositionByShops[(int) $shopId]) ? $maxPositionByShops[(int) $shopId] + 1 : 1;
foreach ($fundingSources as $fundingSource) {
if (!in_array($fundingSource, $availableFundingSourcesByShops[(int) $shopId], true)) {
if (!isset($availableFundingSourcesByShops[(int) $shopId]) || !in_array($fundingSource, $availableFundingSourcesByShops[(int) $shopId], true)) {
$db->insert(
'pscheckout_funding_source',
[
Expand Down Expand Up @@ -233,7 +233,9 @@ function upgrade_module_6_3_3_0($module)
true
);
} catch (Exception $exception) {
PrestaShopLogger::addLog($exception->getMessage(), 3, $exception->getCode(), Ps_checkout::class, $module->id, false);
PrestaShopLogger::addLog($exception->getMessage(), 3, $exception->getCode(), 'Module', $module->id, false);

return false;
}

// Restore initial PrestaShop shop context
Expand Down

0 comments on commit 89e88ac

Please sign in to comment.