-
Notifications
You must be signed in to change notification settings - Fork 517
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
Bad dispatch in UploadHandler #1018
Labels
Comments
Do you have Symfony contracts in vendors? |
Yes in version 1.1.5 |
garak
added a commit
that referenced
this issue
Jul 11, 2019
Please try to require |
Thank you for your quick answer. The bundle looks operationnal again with these corrections. Do you plan to tag it soon ? |
Immediately |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Since the last tag, the upload on several of our projects are broken due to a mistake in the call of the Symfony dispatcher.
Summary
When trying to upload some file on a Symfony 3.4 project, this error message appears :
Type error: Argument 2 passed to Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher::dispatch() must be an instance of Symfony\Component\EventDispatcher\Event or null, string given, called in /home/wwwroot/scp/vendor/vich/uploader-bundle/Handler/UploadHandler.php on line 110
The fact is that the recently added test to manage both versions of Symfony dispatch is ok, but the dispatch themselves are inverted in the if/else.
For instance on my project in Symfony 3.4, the code go on line https://github.com/dustin10/VichUploaderBundle/blob/1.10.0/Handler/UploadHandler.php#L110 which generate the bug as the call should be
Best regards
The text was updated successfully, but these errors were encountered: