Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Fixed use of split which is deprecated

  • Loading branch information...
commit 4b2326cb668b7afdcc57db2eadfdd7b54e3a7a68 1 parent 1742b4b
@halkyon halkyon authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 thirdparty/simpletest/http.php
View
6 thirdparty/simpletest/http.php
@@ -316,7 +316,7 @@ function SimpleHttpHeaders($headers) {
$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 @@ function _parseHeaderLine($header_line) {
* @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 @@ function _parse($raw) {
$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);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.