Commit d81196c
committed
bug #779 do not try to write a cache entry if there is no cache key (themasch)
This PR was merged into the 1.13-dev branch.
Discussion
----------
do not try to write a cache entry if there is no cache key
Writing to the cache with an empty key will fail with "failed to open stream: Is a directory", so do not try to do that.
We noticed this when cloudflare - or the backend service - responded with a "last-modified" header for our CI servers (AWS) but not for our local system. This triggered the condition to become true and it tries to write a cache file without a filename.
I hope this is the correct place to fix it, but from what I see, this code should not try to write a cache with am empty key, correct?
Here is how a `composer install` failed for us (because of this?):
```
[ErrorException]
file_put_contents(/tmp/composer/cache/repo/https---flex.symfony.com/): failed to open stream: Is a directory
```
Commits
-------
e4bb94d do not write a cache entry if there is no cache key1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
0 commit comments