php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78030 imap_open() expects parameter 6 to be array, null given
Submitted: 2019-05-17 22:35 UTC Modified: 2019-05-18 06:59 UTC
From: jshah4517 at gmail dot com Assigned: cmb (profile)
Status: Closed Package: IMAP related
PHP Version: 7.3.5 OS: Linux
Private report: No CVE-ID: None
 [2019-05-17 22:35 UTC] jshah4517 at gmail dot com
Description:
------------
The documentation suggests the default value of the last parameter in the imap_open function is NULL.

imap_open ( string $mailbox , string $username , string $password [, int $options = 0 [, int $n_retries = 0 [, array $params = NULL ]]] ) : resource

However entering NULL as the value for that parameter produces the following error:

imap_open() expects parameter 6 to be array, null given

Test script:
---------------
imap_open('{imap.example.com:993/imap/ssl}INBOX', 'username', 'password', 0, 0, null);

Expected result:
----------------
Based on the documentation, it should allow NULL as a value. Otherwise the documentation should be changed to show this parameter as an empty array.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-05-18 06:58 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=347436
Log: Fix #78030: imap_open() expects parameter 6 to be array, null given

For all practical purposes, the default value is actually an empty array.
 [2019-05-18 06:59 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2019-05-18 06:59 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2019-05-18 07:00 UTC] salathe@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=02ab4924d2875417d291a8e60f529e4ff8672ebf
Log: Fix #78030: imap_open() expects parameter 6 to be array, null given
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=0de6bb1cd91dae7e747a77032a81f32809929fac
Log: Fix #78030: imap_open() expects parameter 6 to be array, null given
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC