php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64199 PHP Notice: Unknown: Sequence out of range (errflg=2) in Unknown on line 0
Submitted: 2013-02-12 17:20 UTC Modified: 2017-10-24 06:51 UTC
Votes:23
Avg. Score:3.7 ± 1.1
Reproduced:20 of 21 (95.2%)
Same Version:6 (30.0%)
Same OS:4 (20.0%)
From: yvan+php at redcell dot ca Assigned:
Status: Open Package: IMAP related
PHP Version: 5.4.11 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-02-12 17:20 UTC] yvan+php at redcell dot ca
Description:
------------
---
From manual page: http://www.php.net/function.imap-fetch-overview
---
Please add a note to this page that using a sequence outside the range of existing messages, or more importantly, a range of 1:1 when there aren't any messages, will result in the notice:

PHP Notice: Unknown: Sequence out of range (errflg=2) in Unknown on line 0


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-19 18:35 UTC] kriscraig@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: kriscraig
 [2013-08-28 15:34 UTC] pheagey at gmail dot com
Would be nice to have a more clearly defined error message when imap_num_msg() 
returns is empty. Like, null or 0 would be nice.
 [2013-09-22 04:08 UTC] rob at svosolutions dot com
A workaround is to check the number of messages before calling 
imap_fetch_overview:

$check = imap_check($mbox);
if ($check->Nmsgs == 0) { imap_close($mbox); }
 [2016-06-25 15:41 UTC] cmb@php.net
-Package: Documentation problem +Package: IMAP related
 [2016-10-19 11:46 UTC] pariharvikram1989 at gmail dot com
imap_search($inbox,'SUBJECT "Employee Wise Monthly Report"',  SE_UID);

i was using this syntax and i got error
PHP Notice: Unknown: Sequence out of range (errflg=2) in Unknown on line 0.

Then I removed SE_UID and rewrite 
imap_search($inbox,'SUBJECT "Employee Wise Monthly Report"',  SE_UID);
My code..
then its worked fine
 [2017-10-24 06:51 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: kriscraig +Assigned To:
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Mar 22 22:01:26 2019 UTC