| @@ 462-477 (lines=16) @@ | ||
| 459 | ||
| 460 | $signData = null; |
|
| 461 | ||
| 462 | if ("json" == $this->format) { |
|
| 463 | ||
| 464 | $respObject = json_decode($r); |
|
| 465 | if (null !== $respObject) { |
|
| 466 | $respWellFormed = true; |
|
| 467 | $signData = $this->parserJSONSignData($request, $resp, $respObject); |
|
| 468 | } |
|
| 469 | } else if ("xml" == $this->format) { |
|
| 470 | ||
| 471 | $respObject = @ simplexml_load_string($resp); |
|
| 472 | if (false !== $respObject) { |
|
| 473 | $respWellFormed = true; |
|
| 474 | ||
| 475 | $signData = $this->parserXMLSignData($request, $resp); |
|
| 476 | } |
|
| 477 | } |
|
| 478 | ||
| 479 | ||
| 480 | //返回的HTTP文本不是标准JSON或者XML,记下错误日志 |
|
| @@ 120-137 (lines=18) @@ | ||
| 117 | $signData = null; |
|
| 118 | $respObject = null; |
|
| 119 | ||
| 120 | if ("json" == $this->format) { |
|
| 121 | ||
| 122 | $respObject = json_decode($r); |
|
| 123 | if (null !== $respObject) { |
|
| 124 | $respWellFormed = true; |
|
| 125 | $signData = $this->parserJSONSignData($request, $response, $respObject); |
|
| 126 | } |
|
| 127 | } else { |
|
| 128 | if ("xml" == $this->format) { |
|
| 129 | ||
| 130 | $respObject = @ simplexml_load_string($response); |
|
| 131 | if (false !== $respObject) { |
|
| 132 | $respWellFormed = true; |
|
| 133 | ||
| 134 | $signData = $this->parserXMLSignData($request, $response); |
|
| 135 | } |
|
| 136 | } |
|
| 137 | } |
|
| 138 | ||
| 139 | //返回的HTTP文本不是标准JSON或者XML,记下错误日志 |
|
| 140 | if (false === $respWellFormed) { |
|