Commit 04964836 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

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

This reverts commit e15db31f.
parent e15db31f
......@@ -109,14 +109,10 @@
* @return PEAR_Error|string the frame returned by the server, or an error object
*/
function request($xml) {
$res = $this->sendFrame($xml);
if ($res instanceof PEAR_Error) {
if (PEAR::isError($res = $this->sendFrame($xml))) {
return $res;
} else {
return $this->getFrame();
}
return $this->getFrame();
}
/**
......
......@@ -70,8 +70,9 @@ class Net_EPP_Protocol {
*/
static function getFrame($socket) {
// Read header
$hdr = Net_EPP_Protocol::_fread_nb($socket,4);
if ($hdr instanceof PEAR_Error) return $hdr;
if (PEAR::isError($hdr = Net_EPP_Protocol::_fread_nb($socket,4))) {
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