Home » Mail » Mail » Bug #268
Error handling trouble in Mail_RFC822::validateMailbox()
Details
| Submitted | 2003-11-18 11:41 UTC |
|---|---|
| From | ed at avi dot ru |
| Status | Duplicate |
| Package | |
| PHP Version | Irrelevant |
| OS | Any |
| 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.