File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ class SmsUpReportResponse
1616 public function __construct (array $ response )
1717 {
1818 foreach ($ response as $ responseMessage ) {
19- $ this ->responseMessages [] = new SmsUpReportResponseMessage ($ responseMessage );
19+ if (array_key_exists ('status ' , $ response )) {
20+ $ this ->responseMessages [] = new SmsUpReportResponseMessage ($ responseMessage );
21+ }
2022 }
2123 }
2224
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class SmsUpReportResponseMessage
4545
4646 public function __construct (array $ response )
4747 {
48+
4849 $ this ->status = $ response ['status ' ];
4950 $ this ->smsId = $ response ['sms_id ' ];
5051 $ this ->from = $ response ['from ' ];
Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ public function __construct(array $response)
3434 $ this ->errorId = isset ($ response ['error_id ' ]) ? $ response ['error_id ' ] : '' ;
3535 $ this ->errorMsg = isset ($ response ['error_msg ' ]) ? $ response ['error_msg ' ] : '' ;
3636 foreach ($ response ['result ' ] as $ responseMessage ) {
37- $ this ->result [] = new SmsUpResponseMessage ($ responseMessage );
37+ if (array_key_exists ('status ' , $ response )) {
38+ $ this ->result [] = new SmsUpResponseMessage ($ responseMessage );
39+ }
3840 }
3941 }
4042
You can’t perform that action at this time.
0 commit comments