Skip to content

Commit c77f7bb

Browse files
committed
Fix PHP 8.1 deprecation: null used as array offset in PriceFactory::findClassForTypes
1 parent 7ccc3d8 commit c77f7bb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/price/PriceFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ public function create(PriceCreationDto $dto): PriceInterface
5959
public function findClassForTypes(array $types)
6060
{
6161
foreach ($types as $type) {
62+
if ($type === null) {
63+
continue;
64+
}
6265
if (isset($this->types[$type])) {
6366
return $this->types[$type];
6467
}

0 commit comments

Comments
 (0)