File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/code/Magento/Fedex/Model Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1089,9 +1089,12 @@ protected function _getXMLTracking($tracking)
1089
1089
* @param \stdClass $response
1090
1090
* @return void
1091
1091
*/
1092
- protected function _parseTrackingResponse ($ trackingValue , \ stdClass $ response )
1092
+ protected function _parseTrackingResponse ($ trackingValue , $ response )
1093
1093
{
1094
- if (in_array ($ response ->HighestSeverity , self ::$ trackingErrors )) {
1094
+ if (!is_object ($ response ) || empty ($ response ->HighestSeverity )) {
1095
+ $ this ->appendTrackingError ($ trackingValue , __ ('Invalid response from carrier ' ));
1096
+ return ;
1097
+ } else if (in_array ($ response ->HighestSeverity , self ::$ trackingErrors )) {
1095
1098
$ this ->appendTrackingError ($ trackingValue , (string ) $ response ->Notifications ->Message );
1096
1099
return ;
1097
1100
} else if (empty ($ response ->CompletedTrackDetails ) || empty ($ response ->CompletedTrackDetails ->TrackDetails )) {
You can’t perform that action at this time.
0 commit comments