#1728 Trying to get property of non-object in Message.class.php

Produces PHP errors
closed-fixed
5
2005-07-21
2005-03-15
Anonymous
No

During display of messages on a v1.4.4 installation,
the following errors appear at the top of the viewing pane:

Notice: Trying to get property of non-object in
D:\...\class\mime\Message.class.php on line 691
Notice: Trying to get property of non-object in
D:\...\class\mime\Message.class.php on line 691
Notice: Trying to get property of non-object in
D:\...\class\mime\Message.class.php on line 692
Notice: Trying to get property of non-object in
D:\...\class\mime\Message.class.php on line 692
Notice: Trying to get property of non-object in
D:\...\class\mime\Message.class.php on line 693

The \...\ above contains full path information; I've
removed it for security reasons.

The lines in question from class\mime\Message.class.php
contain the following:

foreach ($alt_order as $alt) {
if( ($alt == $type) &&
isset($this->entity_id) ) {
if ((count($this->entities) == 0) &&

(!isset($ent->header->parameters['filename'])) &&

(!isset($ent->header->parameters['name'])) &&

(strtolower($this->header->disposition->name) !=
'attachment')) {

...

The value of $ent can never be set. The
!isset($ent->header...) commands are throwing the error.

Environment is PHP v5.x on Apache on Windows 2003
Server. (2 out of 3 ain't bad...)

Submitted by : Troy Thompson
postmaster+squirrelmail@envisionware.com

Discussion

    • assigned_to: nobody --> stekkel
     
  • Logged In: NO

    Reproduced on 1.3.33 with PHP 5.0.4 on Debian Sarge

    Maarten Aertsen
    m.aertsen at gmail dot com

     
  • Logged In: NO

    Apache 1.3.33 that is.

     
  • Tomas Kuliavas
    Tomas Kuliavas
    2005-07-21

    Logged In: YES
    user_id=225877

    Should be fixed in 1.5.1cvs and 1.4.6cvs

     
  • Tomas Kuliavas
    Tomas Kuliavas
    2005-07-21

    • status: open --> closed-fixed