Skip to content

Commit

Permalink
Merge pull request #54 from okazy/fix/trigger
Browse files Browse the repository at this point in the history
trigger データに不整合がある場合でもエラーが発生しないように修正
  • Loading branch information
Kiyotaka Oku authored Jul 28, 2020
2 parents 3489df4 + 60880ff commit 63d223d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/CoreEntityTrigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function emitFor($entity)
} elseif ($entity instanceof ProductTag) {
return $entity->getProduct();
} elseif ($entity instanceof ProductStock) {
return $entity->getProductClass()->getProduct();
return is_null($entity->getProductClass()) ? null : $entity->getProductClass()->getProduct();
} elseif ($entity instanceof TaxRule) {
return $entity->getProduct();
} elseif ($entity instanceof ProductImage) {
Expand Down

0 comments on commit 63d223d

Please sign in to comment.