-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
New breaking error since 1.5.0 - MessageMovedEvent not enough parameters #322
Comments
Hi @devsi , Best regards, |
@Webklex Thanks for the quick response. Can I confirm the following (due to confusing name of function) moveTofolder() fetches the message as here: laravel-imap/src/IMAP/Message.php Lines 1003 to 1004 in d27f53c
Does this not get a singleMessage object, rather than an array? and if so, does referencing the message as laravel-imap/src/IMAP/Events/MessageMovedEvent.php Lines 19 to 21 in d27f53c
|
public static function dispatch() {
return event(new static(func_get_args()));
} ..the two given variables get "cought" by If you have php 7.x running you could also do the following and use the variables directly: public static function dispatch() {
return event(new static(...func_get_args()));
} ..however that's in this case not an option, since laravel 5.0 doesn't require php 7.x. |
I understand. I didn't see the dispatch() function in the parent class. That makes much more sense. Thanks for explaining! |
Describe the bug
On this line since 1.5.0 you added Event:
laravel-imap/src/IMAP/Message.php
Line 1004 in d56d2cc
But the MessageMovedEvent has this signature
laravel-imap/src/IMAP/Events/MessageMovedEvent.php
Line 20 in d56d2cc
You are missing the second parameter for the event. The result is that
message->moveToFolder
does not work and throws an error:Too few arguments to function Webklex\IMAP\Events\MessageMovedEvent::__construct(), 1 passed in /var/www/vendor/webklex/laravel-imap/src/IMAP/Events/Event.php on line 15 and exactly 2 expected
The text was updated successfully, but these errors were encountered: