Number of retries not set when params specified

Bug #55313 Number of retries not set when params specified
Submitted: 2011-07-29 02:58 UTC Modified: 2011-08-06 00:59 UTC
From: kevin at kevinlocke dot name Assigned: felipe (profile)
Status: Closed Package: IMAP related
PHP Version: trunk-SVN-2011-07-29 (SVN) OS:
Private report: No CVE-ID: None

 [2011-07-29 02:58 UTC] kevin at kevinlocke dot name

Description:
------------
It appears that when the params argument was added in commit r293126, the check for argc == 5 was not updated to argc >= 5 at php_imap.c:1230 causing the number of tries/retries to be ignored when 6 arguments are given.

Test script:
---------------
// Next line causes default (2) retries if connection fails
imap_open('{localhost:143/service=imap}', 'user', 'pass', 0, 1, array('DISABLE_AUTHENTICATOR' => 'GSSAPI'));
// Next line causes 0 retries if connection fails
imap_open('{localhost:143/service=imap}', 'user', 'pass', 0, 1);


Expected result:
----------------
Both connection attempts cause 0 retries on failure.

Actual result:
--------------
The first line causes 2 retries (3 total attempts) the second causes 0 retries (1 total attempts).

Patches

imap_open-set_retries_with_6_args (last revision 2011-07-29 03:00 UTC by kevin at kevinlocke dot name)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2011-08-06 00:59 UTC] felipe@php.net

-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe

 [2011-08-06 00:59 UTC] felipe@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Thanks for the patch! :)