Changeset 11238
- Timestamp:
- 08/28/08 22:55:18 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dwhittle/1.2/lib/request/sfWebRequest.class.php
r11168 r11238 114 114 { 115 115 $pathArray = $this->getPathInfoArray(); 116 117 if ($this->isAbsUri()) 118 { 119 return $pathArray['REQUEST_URI']; 120 } 121 122 return $this->getUriPrefix().$pathArray['REQUEST_URI']; 116 $uri = isset($pathArray['REQUEST_URI']) ? $pathArray['REQUEST_URI'] : ''; 117 118 return $this->isAbsUri() ? $uri : $this->getUriPrefix().$uri; 123 119 } 124 120 … … 132 128 $pathArray = $this->getPathInfoArray(); 133 129 134 return preg_match('/^http/', $pathArray['REQUEST_URI']);130 return isset($pathArray['REQUEST_URI']) ? preg_match('/^http/', $pathArray['REQUEST_URI']) : false; 135 131 } 136 132 … … 154 150 } 155 151 156 $host = explode(":", $ pathArray['HTTP_HOST']);152 $host = explode(":", $this->getHost()); 157 153 if (count($host) == 1) 158 154 { 159 $host[] = $pathArray['SERVER_PORT'];155 $host[] = isset($pathArray['SERVER_PORT']) ? $pathArray['SERVER_PORT'] : ''; 160 156 } 161 157 … … 230 226 { 231 227 return $this->requestParameters; 228 } 229 230 public function addRequestParameters($parameters) 231 { 232 $this->requestParameters = array_merge($this->requestParameters, $parameters); 233 $this->getParameterHolder()->add($parameters); 232 234 } 233 235 … … 780 782 $this->parameterHolder->add($this->getParameters); 781 783 784 // POST parameters 785 $this->postParameters = get_magic_quotes_gpc() ? sfToolkit::stripslashesDeep($_POST) : $_POST; 786 $this->parameterHolder->add($this->postParameters); 787 782 788 // additional parameters 783 789 $this->requestParameters = $this->parseRequestParameters(); 784 790 $this->parameterHolder->add($this->requestParameters); 785 791 786 // POST parameters787 $this->postParameters = get_magic_quotes_gpc() ? sfToolkit::stripslashesDeep($_POST) : $_POST;788 $this->parameterHolder->add($this->postParameters);789 790 792 // move symfony parameters to attributes (parameters prefixed with _sf_) 791 793 foreach ($this->parameterHolder->getAll() as $key => $value)