diff --git a/packages/framework/src/Support/DataCollection.php b/packages/framework/src/Support/DataCollection.php index 7185e45e16c..ea1ccb468d2 100644 --- a/packages/framework/src/Support/DataCollection.php +++ b/packages/framework/src/Support/DataCollection.php @@ -84,7 +84,7 @@ public static function yaml(string $name): static */ public static function json(string $name, bool $asArray = false): static { - return static::discover($name, 'json', function (string $file) use ($asArray): stdClass|array { + return static::discover($name, 'json', function (string $file) use ($asArray): stdClass|array|null { return json_decode(Filesystem::getContents($file), $asArray); }); }