Re: Catchable fatal error

From: Date: Mon, 20 Oct 2008 22:02:03 +0000
Subject: Re: Catchable fatal error
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-282159@lists.php.net to get a copy of this message
Richard Kurth wrote:
I figured it out
.. and the magic answer is ? Useful even if just for the archives so others can search for the error/problem and find a solution quickly.
I am getting *Catchable fatal error*: Object of class stdClass could not be converted to string in *C:\web\easycontactpro\openchecker.php* on line *49 line 49 is * $mail_head = imap_headerinfo($conn, $i); what could be casing this. The next line works fine if I delete line 49 $conn = @imap_open("{" . $open['host'] . ":" . $open['port'] . "/" . $open['mailtype'] . "/notls}" . $open['mbeailbox'], $open['username'], $open['password']); print_r(imap_errors());
    $headers = @imap_headers($conn);
    if ($headers) {
         $email_count = sizeof($headers);
         for($i = 1; $i <= $email_count; $i++) {
              # Check the body against all saved patterns
              $mail_head = imap_headerinfo($conn, $i);  <--- Line 49
              $mail_body = imap_fetchbody($conn, $i, 1);
               echo "mail head: $mail_head<br>\n";
               echo "mail body: $mail_body<br>\n";
           
-- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#282159) next »