Skip to content

Commit 213b58d

Browse files
committed
Merge remote-tracking branch 'origin/8.x' into 8.x
2 parents 96effe8 + 03a297f commit 213b58d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Illuminate/Filesystem/LockableFile.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Illuminate\Filesystem;
44

5+
use Exception;
56
use Illuminate\Contracts\Filesystem\LockTimeoutException;
67

78
class LockableFile
@@ -65,6 +66,10 @@ protected function ensureDirectoryExists($path)
6566
protected function createResource($path, $mode)
6667
{
6768
$this->handle = @fopen($path, $mode);
69+
70+
if (! $this->handle) {
71+
throw new Exception('Unable to create lockable file: '.$path.'. Please ensure you have permission to create files in this location.');
72+
}
6873
}
6974

7075
/**

0 commit comments

Comments
 (0)