Every now and then the Web Service SDK throws an empty Exception (code 0 and no message).
They appear on various requests like Player's Maniastars or Serverlists.
I sort of think it's caused by connection errors.
An example vardump:
Code: Select all
object(Maniaplanet\WebServices\Exception)#10 (9) {
["HTTPStatusCode":protected]=>
int(0)
["HTTPStatusMessage":protected]=>
NULL
["message":protected]=>
string(0) ""
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(85) "/.../lib/maniaplanet-ws-sdk/libraries/Maniaplanet/WebServices/HTTPClient.php"
["line":protected]=>
int(338)
["trace":"Exception":private]=>
array(2) {
[0]=>
array(6) {
["file"]=>
string(82) "/.../lib/maniaplanet-ws-sdk/libraries/Maniaplanet/WebServices/Players.php"
["line"]=>
int(42)
["function"]=>
string(7) "execute"
["class"]=>
string(34) "Maniaplanet\WebServices\HTTPClient"
["type"]=>
string(2) "->"
["args"]=>
array(3) {
[0]=>
string(3) "GET"
[1]=>
string(23) "/players/%s/maniastars/"
[2]=>
array(1) {
[0]=>
string(5) "sylv1"
}
}
}
[1]=>
array(6) {
["file"]=>
string(37) "/.../cron/php/maniastars.php"
["line"]=>
int(93)
["function"]=>
string(13) "getManiastars"
["class"]=>
string(31) "Maniaplanet\WebServices\Players"
["type"]=>
string(2) "->"
["args"]=>
array(1) {
[0]=>
string(5) "sylv1"
}
}
}
["previous":"Exception":private]=>
NULL
}
array(2) {
[0]=>
array(6) {
["file"]=>
string(82) "/.../lib/maniaplanet-ws-sdk/libraries/Maniaplanet/WebServices/Players.php"
["line"]=>
int(42)
["function"]=>
string(7) "execute"
["class"]=>
string(34) "Maniaplanet\WebServices\HTTPClient"
["type"]=>
string(2) "->"
["args"]=>
array(3) {
[0]=>
string(3) "GET"
[1]=>
string(23) "/players/%s/maniastars/"
[2]=>
array(1) {
[0]=>
string(5) "sylv1"
}
}
}
[1]=>
array(6) {
["file"]=>
string(37) "/home/steeffe/cron/php/maniastars.php"
["line"]=>
int(93)
["function"]=>
string(13) "getManiastars"
["class"]=>
string(31) "Maniaplanet\WebServices\Players"
["type"]=>
string(2) "->"
["args"]=>
array(1) {
[0]=>
string(5) "sylv1"
}
}
}
Code: Select all
function getManiastars($login) {
if (!$login) {
throw new Exception('Invalid login');
}
return $this->execute('GET', '/players/%s/maniastars/', array($login));
}
What could be causing this?
Regards,
Steff