summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorTom N Harris <tnharris@whoopdedo.org>2012-06-16 02:34:47 -0400
committerTom N Harris <tnharris@whoopdedo.org>2012-06-18 21:47:07 -0400
commita09831ea8abf0abcf3e7f72f0974dc5e0fc301c8 (patch)
tree7ecb42f39c2225a2d6a29012b6c2f8db161fa545 /inc/HTTPClient.php
parent020ab112b3d5b5c640eb1a297ec77ff73cf2b0d7 (diff)
downloadrpg-a09831ea8abf0abcf3e7f72f0974dc5e0fc301c8.tar.gz
rpg-a09831ea8abf0abcf3e7f72f0974dc5e0fc301c8.tar.bz2
Avoid strict warnings about unset array keys.
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index bb87056e2..524dd9a2c 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -227,7 +227,7 @@ class HTTPClient {
$path = $uri['path'];
if(empty($path)) $path = '/';
if(!empty($uri['query'])) $path .= '?'.$uri['query'];
- if(isset($uri['port']) && !empty($uri['port'])) $port = $uri['port'];
+ if(!empty($uri['port'])) $port = $uri['port'];
if(isset($uri['user'])) $this->user = $uri['user'];
if(isset($uri['pass'])) $this->pass = $uri['pass'];
@@ -249,7 +249,7 @@ class HTTPClient {
// prepare headers
$headers = $this->headers;
$headers['Host'] = $uri['host'];
- if($uri['port']) $headers['Host'].= ':'.$uri['port'];
+ if(!empty($uri['port'])) $headers['Host'].= ':'.$uri['port'];
$headers['User-Agent'] = $this->agent;
$headers['Referer'] = $this->referer;
if ($this->keep_alive) {
@@ -583,7 +583,7 @@ class HTTPClient {
$lines = explode("\n",$string);
array_shift($lines); //skip first line (status)
foreach($lines as $line){
- list($key, $val) = explode(':',$line,2);
+ @list($key, $val) = explode(':',$line,2);
$key = trim($key);
$val = trim($val);
$key = strtolower($key);