diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a1fdb5..b6f0c6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.1] - 2025-01-22 + +Minor changes to the project + +### Fixed + - Fixed issue where \LogLib2\Classes\Utilities::getSafeValue(mixed $input) would return + a null value when the typed output is `string` by including a branch that converts + the `gettype($input)` to a string when the input is null. + ## [1.0.0] - 2025-01-22 diff --git a/src/LogLib2/Classes/Utilities.php b/src/LogLib2/Classes/Utilities.php index 7195f01..884a66f 100644 --- a/src/LogLib2/Classes/Utilities.php +++ b/src/LogLib2/Classes/Utilities.php @@ -115,7 +115,8 @@ return match(strtolower(gettype($input))) { - 'boolean', 'integer', 'double', 'float', 'string', 'null' => $input, + 'boolean', 'integer', 'double', 'float', 'string' => $input, + 'null' => 'null', default => sprintf('[%s]', strtoupper(gettype($input))), }; }