Resilience against file_get_contents() race conditions.

This commit is contained in:
Alexander M. Turek 2019-08-07 17:07:08 +02:00
parent 48859fd125
commit 5892837641
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ class Store implements StoreInterface
{
$path = $this->getPath($key);
return file_exists($path) ? file_get_contents($path) : null;
return file_exists($path) && false !== ($contents = file_get_contents($path)) ? $contents : null;
}
/**