split->explode for simpletest

This commit is contained in:
Shish 2011-02-23 18:44:04 +00:00
parent 1982740386
commit d4b8d29e6a
2 changed files with 5 additions and 5 deletions

View File

@ -316,7 +316,7 @@ class SimpleHttpHeaders {
$this->_cookies = array(); $this->_cookies = array();
$this->_authentication = false; $this->_authentication = false;
$this->_realm = false; $this->_realm = false;
foreach (split("\r\n", $headers) as $header_line) { foreach (explode("\r\n", $headers) as $header_line) {
$this->_parseHeaderLine($header_line); $this->_parseHeaderLine($header_line);
} }
} }
@ -521,7 +521,7 @@ class SimpleHttpResponse extends SimpleStickyError {
$this->_setError('Could not split headers from content'); $this->_setError('Could not split headers from content');
$this->_headers = &new SimpleHttpHeaders($raw); $this->_headers = &new SimpleHttpHeaders($raw);
} else { } else {
list($headers, $this->_content) = split("\r\n\r\n", $raw, 2); list($headers, $this->_content) = explode("\r\n\r\n", $raw, 2);
$this->_headers = &new SimpleHttpHeaders($headers); $this->_headers = &new SimpleHttpHeaders($headers);
} }
} }

View File

@ -184,7 +184,7 @@ class SimpleUrl {
function _parseRequest($raw) { function _parseRequest($raw) {
$this->_raw = $raw; $this->_raw = $raw;
$request = new SimpleGetEncoding(); $request = new SimpleGetEncoding();
foreach (split("&", $raw) as $pair) { foreach (explode("&", $raw) as $pair) {
if (preg_match('/(.*?)=(.*)/', $pair, $matches)) { if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
$request->add($matches[1], urldecode($matches[2])); $request->add($matches[1], urldecode($matches[2]));
} elseif ($pair) { } elseif ($pair) {