laravel-ffmpeg
laravel-ffmpeg copied to clipboard
Too few arguments to function FilesystemAdapter::setVisibility()
Hello, get error in line https://github.com/protonemedia/laravel-ffmpeg/blob/main/src/Filesystem/Media.php#L151
With forwards call to FilesystemAdapter method setVisibility expect 2 arguments ($path and $visibility), but in your code you pass only $visibility (but in previous method in Media.php, called copyAllFromTemporaryDirectory you pass two arguments and it's work).
Can you please fix that method with something like this?
public function setVisibility(string $path, string $visibility = null)
{
$disk = $this->getDisk();
if ($visibility && $disk->isLocalDisk()) {
$disk->setVisibility($path, $visibility);
}
return $this;
}
and this in https://github.com/protonemedia/laravel-ffmpeg/blob/main/src/Exporters/MediaExporter.php#L242
if ($outputMedia) {
$outputMedia->copyAllFromTemporaryDirectory($this->visibility);
$outputMedia->setVisibility($path, $this->visibility);
}
Laravel 9.45.0 PHP 8.1 laravel-ffmpeg 8.2.0
Thank you
same issue
Fixed in v8.7.1