PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail » Bug #268

Error handling trouble in Mail_RFC822::validateMailbox()

Details

Submitted2003-11-18 11:41 UTC
Fromed at avi dot ru
StatusDuplicate
PackageMail
PHP VersionIrrelevant
OSAny
Roadmaps(Not assigned)

Comments

[2003-11-18 11:41 UTC] ed at avi dot ru

Description:
------------
Mail_RFC822::validateMailbox() method is using the following construction:

for($i=0; $i<count(@$comments); $i++){...}

So, it tries to hide notice output if $comments variable isn't defined. But if I use custom error handler, the notice is thrown anyway! So the use of @$comments construction is a bad practice; it's better to define $comments as empty array in the beginning of the method:

$comments = array();

[2003-11-18 13:57 UTC] chagenbu at php dot net

Already reported at least once if not more, and already fixed. Will be in the next release.