File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,12 @@ protected static function processSubPartAsMessage($item)
207
207
];
208
208
209
209
foreach ($ item [8 ] as $ itemPart ) {
210
+ if (!is_array ($ itemPart [2 ])) {
211
+ continue ;
212
+ }
213
+
214
+ $ parameters = self ::extractParameters ($ itemPart [2 ], []);
215
+
210
216
$ part = (object ) [
211
217
'type ' => 0 ,
212
218
'encoding ' => 0 ,
@@ -219,23 +225,25 @@ protected static function processSubPartAsMessage($item)
219
225
'ifdisposition ' => 0 ,
220
226
'ifdparameters ' => 0 ,
221
227
'ifparameters ' => 1 ,
222
- 'parameters ' => []
228
+ 'parameters ' => $ parameters
223
229
];
224
230
225
- if (isset ($ itemPart [][0 ])) {
231
+ $ dispositionParametersIndex = 9 ;
232
+
233
+ if (isset ($ itemPart [$ dispositionParametersIndex ][0 ])) {
226
234
$ attribute = null ;
227
235
$ dispositionParameters = [];
228
- $ part ->disposition = $ item [ $ dispositionIndex ][0 ];
229
- if (isset ($ item [ $ dispositionIndex ][1 ]) && is_array ($ item [ $ dispositionIndex ][1 ])) {
230
- foreach ($ item [ $ dispositionIndex ][1 ] as $ value ) {
236
+ $ part ->disposition = $ itemPart [ $ dispositionParametersIndex ][0 ];
237
+ if (isset ($ itemPart [ $ dispositionParametersIndex ][1 ]) && is_array ($ itemPart [ $ dispositionParametersIndex ][1 ])) {
238
+ foreach ($ itemPart [ $ dispositionParametersIndex ][1 ] as $ value ) {
231
239
if (empty ($ attribute )) {
232
240
$ attribute = [
233
241
'attribute ' => $ value ,
234
242
'value ' => null ,
235
243
];
236
244
} else {
237
245
$ attribute ['value ' ] = $ value ;
238
- $ dispositionParameters [] = (object )$ attribute ;
246
+ $ dispositionParameters [] = (object ) $ attribute ;
239
247
$ attribute = null ;
240
248
}
241
249
}
You can’t perform that action at this time.
0 commit comments