PEAR_INSTALLDIR

Jon Parise jon@csh.rit.edu
Fri, 5 Jan 2001 14:13:02 -0500


I just committed a fix to the PHP 4.0.5 tree that should fix the
problem of PEAR_INSTALLDIR not being substituted in pear/PEAR.php.
This should fix the problem people were experiencing with IMP 2.3 and
sending mail ($mail not undefined, or some such error).

-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member


>From max@the Date: Fri,  5 Jan 2001 11:32:51 -0800
Return-Path: <max@the-triumvirate.net>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 18779 invoked from network); 5 Jan 2001 19:34:53 -0000
Received: from cx309195-b.santab1.ca.home.com (HELO zion.the-triumvirate.net) (24.21.86.136)
  by horde.org with SMTP; 5 Jan 2001 19:34:53 -0000
Received: (from http@localhost)
	by zion.the-triumvirate.net (8.10.2/8.10.2) id f05JWp109555
	for dev@lists.horde.org; Fri, 5 Jan 2001 11:32:51 -0800
X-Authentication-Warning: zion.the-triumvirate.net: http set sender to max@the-triumvirate.net using -f
Received: from 128.111.222.23 ( [128.111.222.23])
	as user max@zion.the-triumvirate.net by www.the-triumvirate.net with HTTP;
	Fri,  5 Jan 2001 11:32:51 -0800
Message-ID: <978723171.3a56216333466@www.the-triumvirate.net>
Date: Fri,  5 Jan 2001 11:32:51 -0800
From: Max Kalika <max@the-triumvirate.net>
To: dev@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.6-cvs
Subject: Mail::parseHeaders()

After three of my messages got sucked into oblivion, I began to get 
suspecious.  There's a tiny bug in Mail.php that munges the from address and 
causes sendmail to set the outgoing envelop address to just '@'. 
(Mail_rfc822::parseAddressList() returns a two dimentional array, but 
Mail::parseHeaders() was only looking at the first index)

Here's the patch:  Chuck or Jon, can you fix this in php's cvs?

thanks!

--mk23

[root@host php]# diff -u Mail.php.orig Mail.php 
--- Mail.php.orig   Wed Jan  3 10:24:20 2001
+++ Mail.php Fri Jan  5 11:25:55 2001
@@ -119,7 +119,7 @@
                 include_once 'Mail/rfc822.php';
                 
                 $from_arr = Mail_rfc822::parseAddressList($val, 'localhost');
-                $from = $from_arr[0]->mailbox . '@' . $from_arr[0]->host;
+                $from = $from_arr[0][0]->mailbox . '@' . $from_arr[0][0]->host;
                 if (strstr($from, ' ')) {
                     // Reject outright envelope From addresses with spaces.
                     return false;