@@ -60,7 +60,7 @@ public function addCustomer(Customer $customer): void
60
60
61
61
if ($ value = $ customer ->$ method ()) {
62
62
// Make text node for method value
63
- $ node = $ this ->createTextNode ($ value );
63
+ $ node = $ this ->createTextNode ($ value ?? '' );
64
64
65
65
// Make the actual element and assign the node
66
66
$ element = $ this ->createElement ($ tag );
@@ -96,7 +96,7 @@ public function addCustomer(Customer $customer): void
96
96
if (is_bool ($ nodeValue )) {
97
97
$ nodeValue = ($ nodeValue ) ? 'true ' : 'false ' ;
98
98
}
99
- $ node = $ this ->createTextNode ($ nodeValue );
99
+ $ node = $ this ->createTextNode ($ nodeValue ?? '' );
100
100
101
101
// Make the actual element and assign the node
102
102
$ element = $ this ->createElement ($ tag );
@@ -126,7 +126,7 @@ public function addCustomer(Customer $customer): void
126
126
foreach ($ collectMandateTags as $ tag => $ method ) {
127
127
128
128
// Make the text node for the method value
129
- $ node = $ this ->createTextNode ($ this ->getValueFromCallback ([$ collectMandate , $ method ]));
129
+ $ node = $ this ->createTextNode ($ this ->getValueFromCallback ([$ collectMandate , $ method ]) ?? '' );
130
130
131
131
// Make the actual element and assign the node
132
132
$ element = $ this ->createElement ($ tag );
@@ -179,7 +179,7 @@ public function addCustomer(Customer $customer): void
179
179
if (is_bool ($ nodeValue )) {
180
180
$ nodeValue = ($ nodeValue ) ? 'true ' : 'false ' ;
181
181
}
182
- $ node = $ this ->createTextNode ($ nodeValue );
182
+ $ node = $ this ->createTextNode ($ nodeValue ?? '' );
183
183
184
184
// Make the actual element and assign the node
185
185
$ element = $ this ->createElement ($ tag );
@@ -231,7 +231,7 @@ public function addCustomer(Customer $customer): void
231
231
foreach ($ addressTags as $ tag => $ method ) {
232
232
233
233
// Make the text node for the method value
234
- $ node = $ this ->createTextNode ($ address ->$ method ());
234
+ $ node = $ this ->createTextNode ($ address ->$ method () ?? '' );
235
235
236
236
// Make the actual element and assign the text node
237
237
$ element = $ this ->createElement ($ tag );
@@ -279,7 +279,7 @@ public function addCustomer(Customer $customer): void
279
279
foreach ($ bankTags as $ tag => $ method ) {
280
280
281
281
// Make the text node for the method value
282
- $ node = $ this ->createTextNode ($ bank ->$ method ());
282
+ $ node = $ this ->createTextNode ($ bank ->$ method () ?? '' );
283
283
284
284
// Make the actual element and assign the text node
285
285
$ element = $ this ->createElement ($ tag );
@@ -292,8 +292,8 @@ public function addCustomer(Customer $customer): void
292
292
// Bank address fields
293
293
294
294
// Make the text nodes for the bank address fields
295
- $ field2Node = $ this ->createTextNode ($ bank ->getAddressField2 ());
296
- $ field3Node = $ this ->createTextNode ($ bank ->getAddressField3 ());
295
+ $ field2Node = $ this ->createTextNode ($ bank ->getAddressField2 () ?? '' );
296
+ $ field3Node = $ this ->createTextNode ($ bank ->getAddressField3 () ?? '' );
297
297
298
298
// Make the actual elements and assign the text nodes
299
299
$ field2Element = $ this ->createElement ('field2 ' );
0 commit comments