Преглед изворни кода

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
Alexandre Alapetite пре 1 година
родитељ
комит
c0e87f6a5c
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      app/Utils/dotNotationUtil.php

+ 1 - 1
app/Utils/dotNotationUtil.php

@@ -21,7 +21,7 @@ final class FreshRSS_dotNotation_Util
 			return static::value($default);
 		}
 		/** @var \ArrayAccess<string,mixed>|array<string,mixed> $array */
-		if ($key === null || $key === '') {
+		if (in_array($key, [null, '', '.', '$'], true)) {
 			return $array;
 		}