Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9279
Modified Files:
HttpClient.php
Log Message:
fix some warnings
Index: HttpClient.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/HttpClient.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -2 -b -p -d -r1.2 -r1.3
--- HttpClient.php 10 Apr 2004 02:30:49 -0000 1.2
+++ HttpClient.php 12 Apr 2004 17:37:32 -0000 1.3
@@ -181,10 +181,10 @@ class HttpClient {
}
// If $persist_referers, set the referer ready for the next request
- if ($this->persist_referers) {
+ if (isset($this->persist_referers)) {
$this->debug('Persisting referer: '.$this->getRequestURL());
$this->referer = $this->getRequestURL();
}
// Finally, if handle_redirects and a redirect is sent, do that
- if ($this->handle_redirects) {
+ if (isset($this->handle_redirects)) {
if (++$this->redirect_count >= $this->max_redirects) {
$this->errormsg = 'Number of redirects exceeded maximum ('.$this->max_redirects.')';
@@ -213,9 +213,9 @@ class HttpClient {
}
$headers[] = "Accept-language: {$this->accept_language}";
- if ($this->referer) {
+ if (!empty($this->referer)) {
$headers[] = "Referer: {$this->referer}";
}
// Cookies
- if ($this->cookies) {
+ if (!empty($this->cookies)) {
$cookie = 'Cookie: ';
foreach ($this->cookies as $key => $value) {
@@ -225,5 +225,5 @@ class HttpClient {
}
// Basic authentication
- if ($this->username && $this->password) {
+ if (!empty($this->username) && !empty($this->password)) {
$headers[] = 'Authorization: BASIC '.base64_encode($this->username.':'.$this->password);
}
|