From de61dd5302af882b6812895a6e2e9eda80a9b6a3 Mon Sep 17 00:00:00 2001 From: devin <394694181@qq.com> Date: Wed, 24 May 2023 13:24:25 +0800 Subject: [PATCH] Convert carrier key to string. (#226) --- src/Zipkin/Propagation/Map.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Zipkin/Propagation/Map.php b/src/Zipkin/Propagation/Map.php index 01e9ae84..42db47cb 100644 --- a/src/Zipkin/Propagation/Map.php +++ b/src/Zipkin/Propagation/Map.php @@ -34,11 +34,8 @@ public function get($carrier, string $key): ?string return null; } - /** - * @var string $k - */ foreach ($carrier as $k => $value) { - if (strtolower($k) === $lKey) { + if (strtolower((string) $k) === $lKey) { return $value; } }