We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75f260a commit 4b7abfaCopy full SHA for 4b7abfa
src/components/Storage.php
@@ -105,7 +105,7 @@ public function readPackage(AssetPackage $package)
105
$name = $package->getNormalName();
106
$path = $this->buildHashedPath($name);
107
if (!file_exists($path)) {
108
- return [];
+ return null;
109
}
110
$json = file_get_contents($path);
111
$updateTime = filemtime($path);
@@ -135,7 +135,7 @@ protected function writeProviderLatest($name, $hash)
135
if (file_exists($latest_path)) {
136
$data = Json::decode(file_get_contents($latest_path) ?: '[]');
137
138
- if (!is_array($data)) {
+ if (!isset($data) || !is_array($data)) {
139
$data = [];
140
141
if (!isset($data['providers'])) {
0 commit comments