Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

153
 
734
 
734
 
http_client.php
_> 11 <?php
  22 /*
<> 3 -  $Id: http_client.php 153 2005-08-04 12:57:59Z hpdl $
   3+  $Id: http_client.php 734 2006-08-20 17:56:47Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
5151  * @seeAlso connect
  5252  **/
  5353     function httpClient($host = '', $port = '') {
<> 54 -      if (tep_not_null($host)) {
   54+      if (!empty($host)) {
5555         $this->connect($host, $port);
  5656       }
  5757     }
     
 !
136136     function Connect($host, $port = '') {
  137137       $this->url['scheme'] = 'http';
  138138       $this->url['host'] = $host;
<> 139 -      if (tep_not_null($port)) $this->url['port'] = $port;
   139+      if (!empty($port)) $this->url['port'] = $port;
140140 
  141141       return true;
  142142     }
     
 !
325325           $port = $this->url['port'];
  326326         }
  327327 
<> 328 -        if (!tep_not_null($port)) $port = 80;
   328+        if (!!empty($port)) $port = 80;
329329 
  330330         if (!$this->socket = fsockopen($host, $port, $this->reply, $this->replyString)) {
  331331           return false;
  332332         }
  333333 
<> 334 -        if (tep_not_null($this->requestBody)) {
   334+        if (!empty($this->requestBody)) {
335335           $this->addHeader('Content-Length', strlen($this->requestBody));
  336336         }
  337337 
     
 !
344344           }
  345345         }
  346346 
<> 347 -        if (tep_not_null($this->requestBody)) {
   347+        if (!empty($this->requestBody)) {
<_ 348348           $cmd .= "\r\n" . $this->requestBody;
  349349         }
  350350