From c151f8390e8cd52cc12df63ce0b48b31a4c1b284 Mon Sep 17 00:00:00 2001 From: "Bradley B. Smith" Date: Tue, 4 Feb 2020 09:15:46 -0500 Subject: [PATCH] Using array_key_exists() on objects is deprecated in PHP 7.4 (#38) See https://www.php.net/manual/en/migration74.deprecated.php --- src/Sri.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sri.php b/src/Sri.php index bcb0af7..d8ddf1d 100644 --- a/src/Sri.php +++ b/src/Sri.php @@ -39,7 +39,7 @@ public function hash(string $path): string $json = json_decode(file_get_contents($this->jsonFilePath())); $prefixedPath = Str::startsWith($path, '/') ? $path : "/{$path}"; - if (array_key_exists($prefixedPath, $json)) { + if (property_exists($json, $prefixedPath)) { return $json->$prefixedPath; } }