From: <var...@us...> - 2014-11-08 16:21:44
|
Revision: 9289 http://sourceforge.net/p/phpwiki/code/9289 Author: vargenau Date: 2014-11-08 16:21:41 +0000 (Sat, 08 Nov 2014) Log Message: ----------- Add break; add static Modified Paths: -------------- trunk/lib/HttpClient.php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2014-11-08 16:20:04 UTC (rev 9288) +++ trunk/lib/HttpClient.php 2014-11-08 16:21:41 UTC (rev 9289) @@ -120,10 +120,13 @@ switch ($errno) { case -3: $this->errormsg = 'Socket creation failed (-3)'; + break; case -4: $this->errormsg = 'DNS lookup failure (-4)'; + break; case -5: $this->errormsg = 'Connection refused or timed out (-5)'; + break; default: $this->errormsg = 'Connection failed (' . $errno . ')'; $this->errormsg .= ' ' . $errstr; @@ -166,9 +169,9 @@ $this->debug($this->errormsg); return false; } - $http_version = $m[1]; // not used + // $http_version = $m[1]; // not used $this->status = $m[2]; - $status_string = $m[3]; // not used + $status_string = $m[3]; $this->debug(trim($line)); continue; } @@ -390,7 +393,7 @@ } // "Quick" static methods - function quickGet($url) + static function quickGet($url) { $bits = parse_url($url); $host = $bits['host']; @@ -407,7 +410,7 @@ } } - function quickPost($url, $data) + static function quickPost($url, $data) { $bits = parse_url($url); $host = $bits['host']; @@ -421,7 +424,7 @@ } } - function debug($msg, $object = false) + function debug($msg, $object = null) { if ($this->debug) { print '<div style="border: 1px solid red; padding: 0.5em; margin: 0.5em;"><strong>HttpClient Debug:</strong> ' . $msg; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |