Minor bug in Mail/RFC822.php

From: Date: Mon, 22 Mar 2004 11:49:38 +0000
Subject: Minor bug in Mail/RFC822.php
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26622@lists.php.net to get a copy of this message
Dear All, There is a minor bug in Mail/RFC822.php, which occurs when you have an error handler defined. When you call validateMailbox in RFC822.php it reports the undefined variable '$comments'. [Note: I do not subscribe to the pear-dev list, so please copy me on any correspondence.] In the function validateMailbox: The current code is: function validateMailbox(&$mailbox) { // A couple of defaults. $phrase = ''; $comment = ''; // Catch any RFC822 comments and store them separately $_mailbox = $mailbox; while (strlen(trim($_mailbox)) > 0) { ... Should be changed to: function validateMailbox(&$mailbox) { // A couple of defaults. $phrase = ''; $comment = ''; // Catch any RFC822 comments and store them separately $_mailbox = $mailbox; $comments=null; // <---- NEW STATEMENT while (strlen(trim($_mailbox)) > 0) { ... Best wishes, Alan Hodgkinson Luzern, Switzerland.

« previous php.pear.dev (#26622) next »