[dev] Undefine property: host and mailbox
Serge Grondin
SGrondin at csbf.qc.ca
Wed Jun 4 13:05:13 PDT 2003
Hi,
In IMP RELENG_3, there is the following notice in my php.log everytime
someone send an email to a list in their address book.
PHP Notice: Undefined property: host in /..../horde/imp/lib/IMP.php on
line 634
PHP Notice: Undefined property: mailbox in /..../horde/imp/lib/IMP.php
on line 634
PHP Notice: Undefined property: host in /..../horde/imp/lib/IMP.php on
line 634
This is the patch to correct these notice. It's taken from IMP HEAD.
cvs diff -u
IMP.php
Index: IMP.php
===================================================================
RCS file: /repository/imp/lib/IMP.php,v
retrieving revision 1.198.2.55
diff -u -r1.198.2.55 IMP.php
--- IMP.php 30 May 2003 08:23:13 -0000 1.198.2.55
+++ IMP.php 4 Jun 2003 19:57:46 -0000
@@ -630,8 +630,12 @@
$addressList = array();
$from = imap_rfc822_parse_adrlist($address,
$_SESSION['imp']['maildomain']);
- foreach ($from as $entry) {
- $addressList[] = $entry->mailbox . '@' . $entry->host;
+ foreach ($from as $entry)
{
+ if (isset($entry->mailbox) && isset($entry->host)) {
+ $addressList[] = $entry->mailbox . '@' . $entry->host;
+ } elseif (isset($entry->mailbox)) {
+ $addressList[] = $entry->mailbox;
+ }
}
if ($multiple) {
--
Serge Grondin
Technicien en Informatique
Commission Scolaire des Bois-Francs
Tel. bur.: (819) 758-6453, poste 2920
e-Mail bur.: SGrondin at csbf.qc.ca
More information about the dev
mailing list