{"action":"created","issue":{"url":"https://api.github.com/repos/dereuromark/cakephp-queue/issues/68","labels_url":"https://api.github.com/repos/dereuromark/cakephp-queue/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/dereuromark/cakephp-queue/issues/68/comments","events_url":"https://api.github.com/repos/dereuromark/cakephp-queue/issues/68/events","html_url":"https://github.com/dereuromark/cakephp-queue/issues/68","id":130510467,"number":68,"title":"2.x QueueEmail fails if passing CakeEmail instead of array","user":{"login":"challgren","id":88909,"avatar_url":"https://avatars.githubusercontent.com/u/88909?v=3","gravatar_id":"","url":"https://api.github.com/users/challgren","html_url":"https://github.com/challgren","followers_url":"https://api.github.com/users/challgren/followers","following_url":"https://api.github.com/users/challgren/following{/other_user}","gists_url":"https://api.github.com/users/challgren/gists{/gist_id}","starred_url":"https://api.github.com/users/challgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/challgren/subscriptions","organizations_url":"https://api.github.com/users/challgren/orgs","repos_url":"https://api.github.com/users/challgren/repos","events_url":"https://api.github.com/users/challgren/events{/privacy}","received_events_url":"https://api.github.com/users/challgren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-01T22:50:45Z","updated_at":"2016-02-02T01:29:04Z","closed_at":null,"body":"Data is\r\n\r\n`a:1:{s:8:\"settings\";O:9:\"CakeEmail\":36:{s:6:\" * _to\";a:1:{s:19:\"challgren@gmail.com\";s:19:\"challgren@gmail.com\";}s:8:\" * _from\";a:1:{s:18:\"admin@teamcash.net\";s:8:\"TeamCash\";}s:10:\" * _sender\";a:0:{}s:11:\" * _replyTo\";a:0:{}s:15:\" * _readReceipt\";a:0:{}s:14:\" * _returnPath\";a:0:{}s:6:\" * _cc\";a:0:{}s:7:\" * _bcc\";a:0:{}s:13:\" * _messageId\";b:1;s:10:\" * _domain\";s:15:\"DESKTOP-RBHJA57\";s:11:\" * _subject\";s:5:\"About\";s:11:\" * _headers\";a:0:{}s:10:\" * _layout\";s:7:\"default\";s:12:\" * _template\";s:0:\"\";s:14:\" * _viewRender\";s:4:\"View\";s:12:\" * _viewVars\";a:0:{}s:9:\" * _theme\";N;s:11:\" * _helpers\";a:1:{i:0;s:4:\"Html\";}s:15:\" * _textMessage\";s:0:\"\";s:15:\" * _htmlMessage\";s:0:\"\";s:11:\" * _message\";a:0:{}s:24:\" * _emailFormatAvailable\";a:3:{i:0;s:4:\"text\";i:1;s:4:\"html\";i:2;s:4:\"both\";}s:15:\" * _emailFormat\";s:4:\"text\";s:17:\" * _transportName\";s:18:\"Mailchimp.Mandrill\";s:18:\" * _transportClass\";O:17:\"MandrillTransport\":4:{s:9:\" * _Email\";N;s:10:\" * _Socket\";N;s:11:\" * _headers\";N;s:10:\" * _config\";a:2:{s:3:\"key\";s:22:\"validkey\";s:11:\"useTemplate\";b:1;}}s:7:\"charset\";s:5:\"UTF-8\";s:13:\"headerCharset\";s:5:\"UTF-8\";s:14:\" * _appCharset\";s:5:\"UTF-8\";s:15:\" * _attachments\";a:0:{}s:12:\" * _boundary\";N;s:10:\" * _config\";a:3:{s:9:\"transport\";s:18:\"Mailchimp.Mandrill\";s:3:\"key\";s:22:\"validkey\";s:11:\"useTemplate\";b:1;}s:15:\" * _charset8bit\";a:2:{i:0;s:5:\"UTF-8\";i:1;s:9:\"SHIFT_JIS\";}s:22:\" * _contentTypeCharset\";a:1:{s:14:\"ISO-2022-JP-MS\";s:11:\"ISO-2022-JP\";}s:16:\" * _emailPattern\";s:59:\"/^((?:[\\p{L}0-9.!#$%&'*+\\/=?^_{|}~-]+)*@[\\p{L}0-9-.]+)$/ui\";s:15:\" * _configClass\";s:11:\"EmailConfig\";s:18:\" * _configInstance\";O:11:\"EmailConfig\":1:{s:7:\"default\";a:3:{s:9:\"transport\";s:18:\"Mailchimp.Mandrill\";s:3:\"key\";s:22:\"validkey\";s:11:\"useTemplate\";b:1;}}}}`\r\n\r\nError outputed is\r\n\r\n> [2016-02-01 16:41:08] Looking for Job ...\r\n> Running Job of type \"Email\"\r\n> Warning Error: array_merge(): Argument #2 is not an array in [C:\\Users\\chall\\teamcash-website\\public_html\\Plugin\\Queue\\Console\\Command\\Task\\QueueEmailTask.php, line 99]\r\n> \r\n> Warning Error: Invalid argument supplied for foreach() in [C:\\Users\\chall\\teamcash-website\\public_html\\Plugin\\Queue\\Console\\Command\\Task\\QueueEmailTask.php, line 100]\r\n> \r\n> 2016-02-01 16:41:08 Error: You need to specify at least one destination for to, cc or bcc. (line 1164 in C:\\Users\\chall\\teamcash-website\\Vendor\\cakephp\\cakephp\\lib\\Cake\\Network\\Email\\CakeEmail.php)\r\n> #0 C:\\Users\\chall\\teamcash-website\\public_html\\Plugin\\Tools\\Lib\\EmailLib.php(531): CakeEmail->send(NULL)\r\n> #1 C:\\Users\\chall\\teamcash-website\\public_html\\Plugin\\Queue\\Console\\Command\\Task\\QueueEmailTask.php(110): EmailLib->send(NULL)\r\n> #2 C:\\Users\\chall\\teamcash-website\\public_html\\Plugin\\Queue\\Console\\Command\\QueueShell.php(216): QueueEmailTask->run(Array, '17')\r\n> #3 C:\\Users\\chall\\teamcash-website\\Vendor\\cakephp\\cakephp\\lib\\Cake\\Console\\Shell.php(451): QueueShell->runworker()\r\n> #4 C:\\Users\\chall\\teamcash-website\\Vendor\\cakephp\\cakephp\\lib\\Cake\\Console\\ShellDispatcher.php(212): Shell->runCommand('runworker', Array)\r\n> #5 C:\\Users\\chall\\teamcash-website\\Vendor\\cakephp\\cakephp\\lib\\Cake\\Console\\ShellDispatcher.php(66): ShellDispatcher->dispatch()\r\n> #6 C:\\Users\\chall\\teamcash-website\\public_html\\Console\\cake.php(48): ShellDispatcher::run(Array)\r\n> #7 {main}\r\n> Job did not finish, requeued.\r\n\r\nI would expect the job to complete successfully since I already provided a complete CakeEmail object to the createJob('email', $CakeEmail);\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dereuromark/cakephp-queue/issues/comments/178296482","html_url":"https://github.com/dereuromark/cakephp-queue/issues/68#issuecomment-178296482","issue_url":"https://api.github.com/repos/dereuromark/cakephp-queue/issues/68","id":178296482,"user":{"login":"dereuromark","id":39854,"avatar_url":"https://avatars.githubusercontent.com/u/39854?v=3","gravatar_id":"","url":"https://api.github.com/users/dereuromark","html_url":"https://github.com/dereuromark","followers_url":"https://api.github.com/users/dereuromark/followers","following_url":"https://api.github.com/users/dereuromark/following{/other_user}","gists_url":"https://api.github.com/users/dereuromark/gists{/gist_id}","starred_url":"https://api.github.com/users/dereuromark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereuromark/subscriptions","organizations_url":"https://api.github.com/users/dereuromark/orgs","repos_url":"https://api.github.com/users/dereuromark/repos","events_url":"https://api.github.com/users/dereuromark/events{/privacy}","received_events_url":"https://api.github.com/users/dereuromark/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T01:29:04Z","updated_at":"2016-02-02T01:29:04Z","body":"You are not supposed to pass an Object. Did you take a look at the test cases?"}}