forked from Cavemanon/cavepaintings
replaced deprecated split with explode
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
@ -457,7 +457,7 @@ class SimpleHttpHeaders {
|
||||
* @access private
|
||||
*/
|
||||
function _parseCookie($cookie_line) {
|
||||
$parts = split(";", $cookie_line);
|
||||
$parts = explode(";", $cookie_line);
|
||||
$cookie = array();
|
||||
preg_match('/\s*(.*?)\s*=(.*)/', array_shift($parts), $cookie);
|
||||
foreach ($parts as $part) {
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -106,7 +106,7 @@ class SimpleUrl {
|
||||
}
|
||||
if (preg_match('/^([^\/]*)@(.*)/', $url, $matches)) {
|
||||
$url = $prefix . $matches[2];
|
||||
$parts = split(":", $matches[1]);
|
||||
$parts = explode(":", $matches[1]);
|
||||
return array(
|
||||
urldecode($parts[0]),
|
||||
isset($parts[1]) ? urldecode($parts[1]) : false);
|
||||
@ -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';
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -190,7 +190,7 @@ class HttpHeaderExpectation extends SimpleExpectation {
|
||||
* @access protected
|
||||
*/
|
||||
function _findHeader($compare) {
|
||||
$lines = split("\r\n", $compare);
|
||||
$lines = explode("\r\n", $compare);
|
||||
foreach ($lines as $line) {
|
||||
if ($this->_testHeaderLine($line)) {
|
||||
return $line;
|
||||
@ -206,7 +206,7 @@ class HttpHeaderExpectation extends SimpleExpectation {
|
||||
* @access private
|
||||
*/
|
||||
function _testHeaderLine($line) {
|
||||
if (count($parsed = split(':', $line, 2)) < 2) {
|
||||
if (count($parsed = explode(':', $line, 2)) < 2) {
|
||||
return false;
|
||||
}
|
||||
list($header, $value) = $parsed;
|
||||
@ -1538,4 +1538,4 @@ class WebTestCase extends SimpleTestCase {
|
||||
return $trace->traceMethod();
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user