resolved warnings

This commit is contained in:
Steffen Schröder 2014-05-02 04:58:58 +02:00
parent d3c7b51f2f
commit 47c7a69e5d
2 changed files with 11 additions and 4 deletions

View File

@ -185,7 +185,10 @@ class GbxRemote
*/
private function flush($waitResponse=false)
{
$n = @stream_select($r=array($this->socket), $w=null, $e=null, 0);
$r=array($this->socket);
$w=null;
$e=null;
$n = @stream_select($r, $w, $e, 0);
while($waitResponse || $n > 0)
{
list($handle, $xml) = $this->readMessage();
@ -202,8 +205,12 @@ class GbxRemote
$this->callbacksBuffer[] = $value;
}
if(!$waitResponse)
$n = @stream_select($r=array($this->socket), $w=null, $e=null, 0);
if(!$waitResponse){
$r=array($this->socket);
$w=null;
$e=null;
$n = @stream_select($r, $w, $e, 0);
}
};
}

View File

@ -40,7 +40,7 @@ if(extension_loaded('xmlrpc'))
if($method === null)
{
if(@xmlrpc_is_fault($value))
if(is_array($value) && @xmlrpc_is_fault($value))
return array('fault', $value);
return array('response', $value);
}