From f4f5d2ea7173a28b2e343bc7c3d21c47d70e10ed Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Fri, 6 Mar 2020 12:52:35 +0100 Subject: [PATCH] make invoice factory php7.3 compatible --- .../Webkul/Sales/src/Database/Factories/InvoiceFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php index 18bdaf569..03c5cd36f 100644 --- a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php +++ b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php @@ -12,13 +12,13 @@ $factory->define(Invoice::class, function (Faker $faker, array $attributes) { $shippingAmount = $faker->randomFloat(2); $taxAmount = $faker->randomFloat(2); - if (!$attributes['order_id']) { + if (! isset($attributes['order_id'])) { $attributes['order_id'] = function () { return factory(Order::class)->create()->id; }; } - if (!$attributes['order_address_id']) { + if (! isset($attributes['order_address_id'])) { $attributes['order_address_id'] = function () use ($attributes) { return factory(OrderAddress::class) ->create(['order_id' => $attributes['order_id']])