From a7f32fdb5251c76128da8c4332a2064081633350 Mon Sep 17 00:00:00 2001 From: Alexander Rakushin Date: Fri, 11 Apr 2025 07:52:53 +0300 Subject: [PATCH] fixed an error with the column name "0". When reading a file with indexed column names: 0, 1, 2, ... --- src/file/ThriftFooter.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/file/ThriftFooter.php b/src/file/ThriftFooter.php index 07fc82d..34d6808 100644 --- a/src/file/ThriftFooter.php +++ b/src/file/ThriftFooter.php @@ -211,7 +211,10 @@ protected function _CreateModelSchema(?array $path, array &$container, int $chil array_merge( $path ?? [], // Fallback to empty array as path $se->path ?? [ $se->name ] // NOTE: fallback to array-ified $se->name - ) + ), + function ($v) { + return !empty($v) || $v == "0"; + } ) ));