From a2a5080356ab5cdfbcfbda79684dd6a118a13ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20M=C3=AD=C5=A1ek?= Date: Fri, 16 Aug 2024 12:10:54 +0200 Subject: [PATCH] nullref fix --- src/Peachpie.Runtime/PhpString.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Peachpie.Runtime/PhpString.cs b/src/Peachpie.Runtime/PhpString.cs index 1070ee46e4..25d6e7dd32 100644 --- a/src/Peachpie.Runtime/PhpString.cs +++ b/src/Peachpie.Runtime/PhpString.cs @@ -1127,7 +1127,7 @@ public void GetChars(Encoding encoding, StringBuilder builder) { if (chunks is object[] objs) { - foreach (var obj in objs.AsSpan()) + foreach (var obj in objs.AsSpan(0, _chunksCount)) { ChunkToString(encoding, builder, chunk: obj); }