Commit e15db31f authored by Gavin Brown's avatar Gavin Brown
Browse files

don't use PEAR::isError, use instanceof instead.

parent 1fccbd6d
......@@ -109,10 +109,14 @@
* @return PEAR_Error|string the frame returned by the server, or an error object
*/
function request($xml) {
if (PEAR::isError($res = $this->sendFrame($xml))) {
$res = $this->sendFrame($xml);
if ($res instanceof PEAR_Error) {
return $res;
} else {
return $this->getFrame();
}
return $this->getFrame();
}
/**
......
......@@ -70,9 +70,8 @@ class Net_EPP_Protocol {
*/
static function getFrame($socket) {
// Read header
if (PEAR::isError($hdr = Net_EPP_Protocol::_fread_nb($socket,4))) {
return $hdr;
}
$hdr = Net_EPP_Protocol::_fread_nb($socket,4);
if ($hdr instanceof PEAR_Error) return $hdr;
// Unpack first 4 bytes which is our length
$unpacked = unpack('N', $hdr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment