[phpxmlrpc] Ping: Anybody here? (xmlrpc_client errstring)

Jed S. Baer thag@frii.com
Fri, 6 Dec 2002 15:21:15 -0700

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:

    $fp=fsockopen($server, $port,
      &$this->errno, &$this->errstr, $timeout);
    $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.
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