Skip to content

Commit 3f1c2fd

Browse files
committed
- Added default value for $data property as in most cases it will expect an array even if the data is not set on an Entity
1 parent 2038bbf commit 3f1c2fd

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/Marello/Bundle/ProductBundle/Entity/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ class Product extends ExtendProduct implements
439439
* }
440440
* )
441441
*/
442-
protected $data;
442+
protected $data = [];
443443

444444
/**
445445
* @var ArrayCollection|ProductSupplierRelation[]

src/Marello/Bundle/PurchaseOrderBundle/Entity/PurchaseOrder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class PurchaseOrder implements DerivedPropertyAwareInterface
158158
* }
159159
* )
160160
*/
161-
protected $data;
161+
protected $data = [];
162162

163163
/**
164164
* Creates order using products

src/Marello/Bundle/PurchaseOrderBundle/Entity/PurchaseOrderItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class PurchaseOrderItem implements
187187
*
188188
* @ORM\Column(name="data", type="json_array", nullable=true)
189189
*/
190-
protected $data;
190+
protected $data = [];
191191

192192
/**
193193
* @var string

src/Marello/Bundle/TaxBundle/Entity/TaxCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class TaxCode extends ExtendTaxCode
8383
* }
8484
* )
8585
*/
86-
protected $data;
86+
protected $data = [];
8787

8888
/**
8989
* @return string

src/Marello/Bundle/TaxBundle/Entity/TaxJurisdiction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class TaxJurisdiction implements DatesAwareInterface
155155
* }
156156
* )
157157
*/
158-
protected $data;
158+
protected $data = [];
159159

160160
/**
161161
* Constructor

src/Marello/Bundle/TaxBundle/Entity/TaxRate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class TaxRate
7979
* }
8080
* )
8181
*/
82-
protected $data;
82+
protected $data = [];
8383

8484
/**
8585
* @return string

src/Marello/Bundle/TaxBundle/Entity/TaxRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class TaxRule
9393
* }
9494
* )
9595
*/
96-
protected $data;
96+
protected $data = [];
9797

9898
/**
9999
* @return string

0 commit comments

Comments
 (0)