Skip to content

Commit

Permalink
Merge pull request #2036 from dkarlovi/patch-3
Browse files Browse the repository at this point in the history
fix: property must not be accessed before initialization
  • Loading branch information
dpfaffenbauer authored Jul 6, 2022
2 parents 56743c7 + caba48a commit 8d818e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(private SiteIdProvider $siteIdProvider, private Goog

public function getGoogleConfig(): ?ConfigObject
{
if (null !== $this->googleConfig) {
if (isset($this->googleConfig)) {
return $this->googleConfig;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ protected function transformProductAction(array $item): array
'id' => $item['id'],
'name' => $item['name'],
'category' => $item['category'],
'brand' => $item['brand'],
'variant' => $item['variant'],
'brand' => $item['brand'] ?? null,
'variant' => $item['variant'] ?? null,
'price' => round($item['price'], 2),
'quantity' => $item['quantity'] ?: 1,
'position' => $item['position'],
'quantity' => $item['quantity'] ?? 1,
'position' => $item['position'] ?? null,
'currency' => $item['currency'],
]);
}
Expand Down

0 comments on commit 8d818e2

Please sign in to comment.