From f21a164c055a5e88b430fa86dce14fc31bfd1afb Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 18 Jul 2024 00:35:13 +0200 Subject: JSON Dot Notation allow string conversion (#6631) Allow fetching a string from string-friendly types. Fix https://github.com/FreshRSS/FreshRSS/discussions/6626 --- app/Utils/dotNotationUtil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Utils') diff --git a/app/Utils/dotNotationUtil.php b/app/Utils/dotNotationUtil.php index a7fb066d1..9c44e5312 100644 --- a/app/Utils/dotNotationUtil.php +++ b/app/Utils/dotNotationUtil.php @@ -55,7 +55,7 @@ final class FreshRSS_dotNotation_Util */ public static function getString($array, ?string $key): ?string { $result = self::get($array, $key, null); - return is_string($result) ? $result : null; + return is_string($result) || is_bool($result) || is_float($result) || is_int($result) ? (string)$result : null; } /** -- cgit v1.2.3