You are here: Re: Suppressing Notices from imap_headerinfo()? « PHP Programming Language « IT news, forums, messages
Re: Suppressing Notices from imap_headerinfo()?

Posted by Chung Leong on 10/23/62 11:33

Mike Walsh wrote:
> I am using imap_headerinfo() to query articles from an NNTP server.
>
> I have encountered a situation where I can't suppress some notices from
> imap_headerinfo() and I can't figure out why. It appears that
> imap_headerinfo() doesn't like the e-mail address in the article (which is
> SPAM blocked) and spits out the following:
>
> Notice: (null)(): Unterminated mailbox: t.gould@.MISSING-HOST-NAME.
> (errflg=3) in Unknown on line 0
>
> Notice: (null)(): Must use comma to separate addresses:
> lancaster(DOT.)ac(DOT.)uk> (errflg=3) in Unknown on line 0
>
> I have tried calling ob_start() and ob_clean() around my calls to
> imap_headerinfo() as well as adding the '@' character to the call to
> imap_headerinfo().
>
> ob_start() ;
> $header = @imap_headerinfo($nntp, $i) ;
>
> $ob = ob_get_contents() ;
> ob_clean() ;
>
> Oddly the $ob variable doesn't contain anything which implies that
> imap_headerinfo() is dumping it's notices directly.
>
> Any suggestions on how to suppress these notices? I don't even use the
> email field in my application.

These notices are output in the request shutdown function of the IMAP
extension--that's why it's showing null at the function name and 0 as
line number. Doing a error_reporting(0) at the end of your script
should suppress them.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация