On second thought.. You might want to assert that your email field contains a value when trying to send an email to this email, first :)
Am Freitag, 27. September 2013 21:19:58 UTC+2 schrieb CrotchFrog:
-- Sending to an empty string also doesnt make much sense
Am Freitag, 27. September 2013 21:19:58 UTC+2 schrieb CrotchFrog:
huh, sure enough :) I never came across that issue before but casting definitely did the trick. Thanks for the help!On Fri, Sep 27, 2013 at 12:22 PM, euromark <dereu...@gmail.com> wrote:
User setter/getter combinational methods is pretty dangerous IMO :)Especially with a typo-unsafe language as PHP and multiple return types.I never use CakeEmail that way - for that very same reason.to() - as other methods - can return an array when you submit null as email.
My guess: $user['User']['email'] is NULL here, thus the array which you can't use as object anymoreYou need to cast your fields when doing it this way:->to((string)$user['User']['email'])
Am Freitag, 27. September 2013 16:15:50 UTC+2 schrieb CrotchFrog:Cake 2.41http://bin.cakephp.org/saved/108632
I'm running into problems trying to send email from plugin.When debug is set to 'Zero' it triggers error : "Error: An internal error has occurred."When debug set to '2' it throws error: "Error: Call to a member function subject() on a non-object."Not too sure what is going on here. Any help is appreciated :)--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cake-php/Sa531dnBaLo/ .unsubscribe
To unsubscribe from this group and all its topics, send an email to cake-php+u...@googlegroups.com .
To post to this group, send email to cake...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php .
For more options, visit https://groups.google.com/groups/opt_out .
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment