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->_authentication = false;
$this->_realm = false;
foreach (split("\r\n", $headers) as $header_line) {
foreach (explode("\r\n", $headers) as $header_line) {
$this->_parseHeaderLine($header_line);
}
}
@ -521,7 +521,7 @@ class SimpleHttpResponse extends SimpleStickyError {
$this->_setError('Could not split headers from content');
$this->_headers = &new SimpleHttpHeaders($raw);
} 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);
}
}
@ -621,4 +621,4 @@ class SimpleHttpResponse extends SimpleStickyError {
return ! $packet;
}
}
?>
?>

View File

@ -184,7 +184,7 @@ class SimpleUrl {
function _parseRequest($raw) {
$this->_raw = $raw;
$request = new SimpleGetEncoding();
foreach (split("&", $raw) as $pair) {
foreach (explode("&", $raw) as $pair) {
if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
$request->add($matches[1], urldecode($matches[2]));
} elseif ($pair) {
@ -525,4 +525,4 @@ class SimpleUrl {
return 'com|edu|net|org|gov|mil|int|biz|info|name|pro|aero|coop|museum';
}
}
?>
?>