Re: [SOAP] PATCH: Options Bug in Client.php (was Possible Bug in Transport.php?)

From: Date: Sat, 24 May 2003 15:39:43 +0000
Subject: Re: [SOAP] PATCH: Options Bug in Client.php (was Possible Bug in Transport.php?)
References: 1 2 3 4  Groups: php.soap 
Request: Send a blank email to php-soap+get-659@lists.php.net to get a copy of this message
David Busby wrote:
I'm glad my sloppy code has discovered (and led to the fix) of bugs. If it's any help I patched by doing this: Client.php from this (starts on Line 309 for version .7.3):
Are you sure this is from .7.3? What's the version on line 20 (should show 1.58) .7.2 had this code, but I changed it in .7.3 to:
    function setOpt($category, $option, $value=NULL)
    {
        if ($value) {
            if (!isset($this->__options[$category]))
                $this->__options[$category] = array();
            $this->__options[$category][$option] = $value;
        } else {
            $this->__options[$category] = $option;
        }
    }
    function setOpt($category, $option, $value=NULL)
    {
        if ($value) {
          if (in_array($category, $this->__optionCategories)) {
            $this->__options[$category][$option] = $value;
          }
        } else {
           $this->__options[$category] = $option;
        }
    }
to this:
    function setOpt($category, $option, $value=NULL)
    {
        if ($value) {
          if (in_array($category, $this->__optionCategories)) {
            if (!is_array($this->__options[$category]))
$this->__options[$category] = array();
            $this->__options[$category][$option] = $value;
          }
        } else {
           $this->__options[$category] = $option;
        }
    }
I don't know how to use diff yet (probablly easy huh?) HTH /B


« previous php.soap (#659) next »