From 18a2498f918208be88b903b4ee0de5dbb1c77e64 Mon Sep 17 00:00:00 2001 From: Juraj Vanak Date: Fri, 14 Nov 2025 12:39:27 +0100 Subject: [PATCH] Set null value when process empty file params, instead of false --- CHANGELOG.md | 4 ++++ src/Misc/ConsoleRequest.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acede3f..034e545 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles. ## [Unreleased][unreleased] +### Changed +* Set null value when process empty file params, instead of false + + ## 3.0.0 diff --git a/src/Misc/ConsoleRequest.php b/src/Misc/ConsoleRequest.php index 90bcfd1..f9ab891 100644 --- a/src/Misc/ConsoleRequest.php +++ b/src/Misc/ConsoleRequest.php @@ -211,7 +211,7 @@ private function processParam(ParamInterface $param, string $key, $value) if ($file->isOk()) { $valueData = curl_file_create($file->getTemporaryFile(), $file->getContentType(), $file->getName()); } else { - $valueData = false; + $valueData = null; } } elseif ($param->getType() === InputParam::TYPE_POST_RAW) { $valueData = file_get_contents('php://input');