From c0e87f6a5c9b07cdde82e4c1876e19b8bf98d543 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 22 May 2024 23:21:16 +0200 Subject: Fix JSON Dot direct array (#6476) * Fix JSON Dot direct array Allow consuming a JSON array in which entries are top level https://github.com/FreshRSS/FreshRSS/issues/6474 * Allow $ as root --- app/Utils/dotNotationUtil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Utils/dotNotationUtil.php b/app/Utils/dotNotationUtil.php index a4a8ef471..a7fb066d1 100644 --- a/app/Utils/dotNotationUtil.php +++ b/app/Utils/dotNotationUtil.php @@ -21,7 +21,7 @@ final class FreshRSS_dotNotation_Util return static::value($default); } /** @var \ArrayAccess|array $array */ - if ($key === null || $key === '') { + if (in_array($key, [null, '', '.', '$'], true)) { return $array; } -- cgit v1.2.3