cvs: pear /Net_URL URL.php

From: Date: Wed, 02 Mar 2005 03:10:39 +0000
Subject: cvs: pear /Net_URL URL.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-29986@lists.php.net to get a copy of this message
richard Tue Mar 1 22:10:39 2005 EDT Modified files: /pear/Net_URL URL.php Log: Fix bug #2824 http://cvs.php.net/diff.php/pear/Net_URL/URL.php?r1=1.39&r2=1.40&ty=u Index: pear/Net_URL/URL.php diff -u pear/Net_URL/URL.php:1.39 pear/Net_URL/URL.php:1.40 --- pear/Net_URL/URL.php:1.39 Tue Mar 1 22:05:24 2005 +++ pear/Net_URL/URL.php Tue Mar 1 22:10:38 2005 @@ -32,7 +32,7 @@ // | Author: Richard Heyes <richard at php net> | // +-----------------------------------------------------------------------+ // -// $Id: URL.php,v 1.39 2005/03/02 03:05:24 richard Exp $ +// $Id: URL.php,v 1.40 2005/03/02 03:10:38 richard Exp $ // // Net_URL Class (PHP5 Only) @@ -125,7 +125,7 @@ // Only use defaults if not an absolute URL given if (!preg_match('/^[a-z0-9]+:\/\//i', $url)) { - $this->protocol = (@$_SERVER['HTTPS'] == 'on' ? 'https' : 'http'); + $this->protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http'); /** * Figure out host/port @@ -370,7 +370,7 @@ } if (substr($key, -2) == '[]') { $key = substr($key, 0, -2); - if (@!is_array($return[$key])) { + if (empty($return[$key]) || !is_array($return[$key])) { $return[$key] = array(); $return[$key][] = $value; } else {

« previous php.pear.cvs (#29986) next »