Re: strange error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007. 10. 25, csütörtök keltezéssel 09.15-kor Jeff Mckeon ezt írta:
> I'm getting this error on a php based ticket system we have.  I don't see
> this on the old server running php4.  This new server is running php5.
> 
> PHP_Fatal_error:__Cannot_use_object_of_type_PEAR_Error_as_array_in_/srv/www/
> virtual/support/mailparser.php_on_line_300/
> 
> The code in that section looks like this...
> 
>   function firstemail($addrs)
>   {
>     $name="";
>     $structure = Mail_RFC822::parseAddressList($addrs);
>     $ret= $structure[0]->mailbox."@".$structure[0]->host;  ### line 300 is
> here...
>     if ($ret=="@localhost") $ret="";
>     else $name=$structure[0]->personal;
>     return array($ret,$name);
>   }
> 
> Any idea what may be the issue here?

the class Mail_RFC822 encountered some error, and thus returned a
PEAR_Error object. on the next line you try to access it as an array,
which of course throws a fatal error.

try to dump out the error object to see what is the pear error
encountered.

greets
Zoltán Németh

> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux