Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Using the native fopen exception in LockableFile.php #49895

Merged
merged 2 commits into from Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/Illuminate/Filesystem/LockableFile.php
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