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.

This commit is contained in:
netkas 2025-01-22 13:53:32 -05:00
parent 838b6137dc
commit 4848eee708
2 changed files with 11 additions and 1 deletions

View file

@ -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))),
};
}