mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Fixed use of split which is deprecated
This commit is contained in:
parent
1742b4b742
commit
4b2326cb66
6
thirdparty/simpletest/http.php
vendored
6
thirdparty/simpletest/http.php
vendored
@ -316,7 +316,7 @@ class SimpleHttpHeaders {
|
||||
$this->_cookies = array();
|
||||
$this->_authentication = false;
|
||||
$this->_realm = false;
|
||||
foreach (split("\r\n", $headers) as $header_line) {
|
||||
foreach (preg_split("/\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 = preg_split('/;/', $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) = preg_split("/\r\n\r\n/", $raw, 2);
|
||||
$this->_headers = new SimpleHttpHeaders($headers);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user