Skip to content

Commit

Permalink
[10.x] Using the native fopen exception in LockableFile.php (#49895)
Browse files Browse the repository at this point in the history
* [10.x] Using the native fopen exception in LockableFile.php

* Removed unused Exception.
  • Loading branch information
eusonlito authored Jan 30, 2024
1 parent 784d076 commit af2a7ca
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Illuminate/Filesystem/LockableFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Illuminate\Filesystem;

use Exception;
use Illuminate\Contracts\Filesystem\LockTimeoutException;

class LockableFile
Expand Down Expand Up @@ -67,11 +66,7 @@ protected function ensureDirectoryExists($path)
*/
protected function createResource($path, $mode)
{
$this->handle = @fopen($path, $mode);

if (! $this->handle) {
throw new Exception('Unable to create lockable file: '.$path.'. Please ensure you have permission to create files in this location.');
}
$this->handle = fopen($path, $mode);
}

/**
Expand Down

0 comments on commit af2a7ca

Please sign in to comment.