From 718c1dfa1e243a12f7cc5798fcd4ebcb5c7c95f6 Mon Sep 17 00:00:00 2001 From: Denis Smetannikov Date: Thu, 3 Aug 2023 11:13:09 +0300 Subject: [PATCH] Fixed Psalm PossiblyInvalidOperand (#27) --- src/Ini.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ini.php b/src/Ini.php index 1455e12..a353a75 100644 --- a/src/Ini.php +++ b/src/Ini.php @@ -41,11 +41,11 @@ protected function render(array $data = [], array $parent = []): string $result[] = $this->render($dataValue, $sections); } else { foreach ($dataValue as $key => $value) { - $result[] = $dataKey . '[' . $key . '] = "' . \str_replace('"', '\"', $value) . '"'; + $result[] = $dataKey . '[' . $key . '] = "' . \str_replace('"', '\"', (string)$value) . '"'; } } } else { - $result[] = $dataKey . ' = "' . \str_replace('"', '\"', $dataValue) . '"'; + $result[] = $dataKey . ' = "' . \str_replace('"', '\"', (string)$dataValue) . '"'; } }