Skip to content

Commit

Permalink
Fix al no existir mensaje en el estado de respuesta HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
estebandelaf committed Nov 13, 2018
1 parent 2120040 commit 829c817
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sdk/Network/Http/Socket.php
Expand Up @@ -145,18 +145,18 @@ private static function parseHeader($header)
* @param response_line
* @return Arreglo con índices: protocol, code, message
* @author Esteban De La Fuente Rubio, DeLaF (esteban[at]delaf.cl)
* @version 2014-12-03
* @version 2018-11-12
*/
private static function parseStatus($response_line)
{
if (is_array($response_line)) {
$response_line = $response_line[count($response_line)-1];
}
list($protocol, $status, $message) = explode(' ', $response_line, 3);
$parts = explode(' ', $response_line, 3);
return [
'protocol' => $protocol,
'code' => $status,
'message' => $message,
'protocol' => $parts[0],
'code' => $parts[1],
'message' => !empty($parts[2]) ? $parts[2] : null,
];
}

Expand Down

0 comments on commit 829c817

Please sign in to comment.