Revert "Pass $path by reference in media.file.upload event (#4612)" (#4613)

This reverts commit 868c7ec11c.
This commit is contained in:
Luke Towers 2019-09-10 12:20:27 -06:00 committed by GitHub
parent 868c7ec11c
commit 0b71a4bf2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1576,18 +1576,18 @@ class MediaManager extends WidgetBase
*
* Example usage:
*
* Event::listen('media.file.upload', function((\Backend\Widgets\MediaManager) $mediaWidget, (string) &$path, (\Symfony\Component\HttpFoundation\File\UploadedFile) $uploadedFile) {
* Event::listen('media.file.upload', function((\Backend\Widgets\MediaManager) $mediaWidget, (string) $path, (\Symfony\Component\HttpFoundation\File\UploadedFile) $uploadedFile) {
* \Log::info($path . " was upoaded.");
* });
*
* Or
*
* $mediaWidget->bindEvent('file.upload', function ((string) &$path, (\Symfony\Component\HttpFoundation\File\UploadedFile) $uploadedFile) {
* $mediaWidget->bindEvent('file.upload', function ((string) $path, (\Symfony\Component\HttpFoundation\File\UploadedFile) $uploadedFile) {
* \Log::info($path . " was uploaded");
* });
*
*/
$this->fireSystemEvent('media.file.upload', [&$filePath, $uploadedFile]);
$this->fireSystemEvent('media.file.upload', [$filePath, $uploadedFile]);
$response = Response::make([
'link' => MediaLibrary::url($filePath),