1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-26 11:05:28 +01:00

[Http] Optimizing getTokenizedHeader

This commit is contained in:
Michael Dowling 2012-05-14 21:52:57 -07:00
parent 800ac34b5f
commit c457e3e47c

View File

@ -230,9 +230,13 @@ abstract class AbstractMessage implements MessageInterface
}
}
return $data->map(function($key, $value) {
return is_array($value) ? array_unique($value) : $value;
});
foreach ($data as $key => $value) {
if (is_array($value)) {
$data->set($key, array_unique($value));
}
}
return $data;
}
/**