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: 2020-11-17 12:51 UTC
Votes:28
Avg. Score:3.6 ± 1.2
Reproduced:25 of 26 (96.2%)
Same Version:7 (28.0%)
Same OS:5 (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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yvan+php at redcell dot ca
New email:
PHP Version: OS:

 

 [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:
 [2020-11-17 12:51 UTC] cmb@php.net
> PHP Notice: Unknown: Sequence out of range (errflg=2) in Unknown
> on line 0

Note that the "in Unknown on line 0" is caused by bug #65455.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 04:01:30 2024 UTC