kohana-email
kohana-email copied to clipboard
wrong array preparation
Here: if ( ! in_array($method, array('to', 'cc', 'bcc')))
Because in_array(0, array('to', 'cc', 'bcc'))
equals to true
It's better to use
if ( ! in_array($method, array('to', 'cc', 'bcc'), true))
instead to strict compare
Thanks for this. I'm not actively maintaining this repo as I have no use for it currently. If you submit a pull request I'll accept it though.
Out of interest did you actually have a problem with this in real life or is it just something you spotted as being potentially an issue?
Yes, I had while using in such way: Email::send(array('[email protected]', '[email protected]'), $to, $subject, $body); I'll send you pull request in a moment
I use it in such way:
Email::send(array('[email protected]'), $to, $subject, $body);
I had problem, when only one email in $to