Ping: Anybody here? (xmlrpc_client errstring)

"Jed S. Baer" <[email protected]>
Newsgroups gmane.comp.php.xml-rpc
Organization linked
Message-ID <[email protected]>
Hi Folks.

Just recently downloaded the latest from Sourceforge, and I have a short
script using it for sending a ping to weblogs.com. Still in the debugging
stage. It apparently works, but it doesn't realize that.

But, I found maybe a bug in the code. In the class spec for xmlrpc_client,
$errstring is defined, but in the method sendPayloadHTTP10, I find:

 if($timeout>0)
    $fp=fsockopen($server, $port,
      &$this->errno, &$this->errstr, $timeout);
 else
    $fp=fsockopen($server, $port,
      &$this->errno, &$this->errstr);

Which implies to me that it should be $errstr, not $errstring.

I note that I got this error once: "Undefined property:  errstring 
in /path/to/xmlping.php on line 21", from this code:

 $xresponse = $xclient->send($xmlping,5);
 if (!is_object($xresponse,'xmlrpcresp')) {
     echo 'Error: '.$xclient->errno. ' - '. $xclient->errstring;
 ...

The short timeout is just for testing purposes. Unfortunately, I can't
reproduce this error, so I'm left wondering what happened. Using the
syntax $xclient->errstr produces no error either.

Thanks for any suggestions.
jed
-- 
We're frogs who are getting boiled in a pot full of single-character
morphemes, and we don't notice. - Larry Wall; Perl6, Apocalypse 5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.