Ver código fonte

JSON Dot Notation allow string conversion (#6631)

Allow fetching a string from string-friendly types.
Fix https://github.com/FreshRSS/FreshRSS/discussions/6626
Alexandre Alapetite 1 ano atrás
pai
commit
f21a164c05
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      app/Utils/dotNotationUtil.php

+ 1 - 1
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;
 	}
 
 	/**