Skip to content

Commit

Permalink
Using array_key_exists() on objects is deprecated in PHP 7.4 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bradley B. Smith authored Feb 4, 2020
1 parent 6a31fab commit c151f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sri.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c151f83

Please sign in to comment.