Req #19378 [WFx->Csd]: Cannot preload items: limit
| From: | till@php.net | Date: | Sat, 03 Nov 2012 20:34:26 +0000 |
| Subject: | Req #19378 [WFx->Csd]: Cannot preload items: limit | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9290@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19378&edit=1
ID: 19378
Updated by: till@php.net
Reported By: pear at crewtax dot net
Summary: Cannot preload items: limit
-Status: Wont fix
+Status: Closed
Type: Feature/Change Request
Package: Mail_Queue
Operating System: Linux
Package Version: 1.2.7
PHP Version: 5.3.3
-Assigned To:
+Assigned To: till
Roadmap Versions:
New Comment:
-Status: Wont fix
+Status: Closed
-Assigned To:
+Assigned To: till
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
I managed to write a test and was able to squash this bug in the new
code base:
https://github.com/pear2/Mail_Queue/commit/971d1a9b3c35ee7213d765173c1619a8
f4e090ad
Previous Comments:
------------------------------------------------------------------------
[2012-11-03 19:58:51] till
-Status: Open
+Status: Wont fix
-Type: Bug
+Type: Feature/Change Request
I can't reproduce this bug with the new codebase.
If you guys want to have a look â this is almost done:
https://github.com/pear2/Mail_Queue
Otherwise, please re-open with a test case.
------------------------------------------------------------------------
[2012-07-05 15:46:13] panamajo
I ran into the same problem and solved it:
This (bogus) error message always occurs when
Mail_Queue::$limit % Mail_Queue_Container::$buffer_size == 0
The "Cannot initialize container" message is wrong. It is generated in
Mail_Queue_Container->get() and apparently when it is executed we have a
valid initialized container instance. I guess the 2 uses of
MAILQUEUE_ERROR_CANNOT_INITIALIZE are a C&P error.
Just replace the content in the 2nd condition:
if ($err !== true) {
// limit met
return FALSE;
}
instead of returning a Mail_Queue_Error instance with a misleading
message.
------------------------------------------------------------------------
[2012-04-09 03:15:13] truenorf
Description:
------------
Still getting "Mail Queue Error: Cannot initialize container" and
"Cannot preload items: limit" in ver 1.2.7 when trying to send 50
emails in a batch.
Test script:
---------------
//snip - - - $container_options and $mail_options init - - -
/* How many mails could we send each time the script is called */
$max_amount_mails = 50;
$mail_queue =& new Mail_Queue($container_options, $mail_options);
$result = $mail_queue->sendMailsInQueue($max_amount_mails);
Expected result:
----------------
50 emails sent from queue
Actual result:
--------------
Some emails sent from queue (how many, I don't know?!) and
the error messages: "Mail Queue Error: Cannot initialize
container" and "Cannot preload items: limit"
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19378&edit=1