Resilience against file_get_contents() race conditions.
This commit is contained in:
parent
48859fd125
commit
5892837641
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in New Issue