From 47c7a69e5ddbcc9bcc271bda42c7ee50b4aaad9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Fri, 2 May 2014 04:58:58 +0200 Subject: [PATCH] resolved warnings --- .../DedicatedServer/Xmlrpc/GbxRemote.php | 13 ++++++++++--- .../Maniaplanet/DedicatedServer/Xmlrpc/Request.php | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/application/core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php b/application/core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php index 30d55799..5350eaf8 100644 --- a/application/core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php +++ b/application/core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php @@ -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); + } }; } diff --git a/application/core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/Request.php b/application/core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/Request.php index 861569d1..1925754a 100644 --- a/application/core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/Request.php +++ b/application/core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/Request.php @@ -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); }