From 4b2326cb668b7afdcc57db2eadfdd7b54e3a7a68 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Tue, 10 Apr 2012 21:44:10 +1200 Subject: [PATCH] MINOR Fixed use of split which is deprecated --- thirdparty/simpletest/http.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thirdparty/simpletest/http.php b/thirdparty/simpletest/http.php index 176d9fccd..367504413 100644 --- a/thirdparty/simpletest/http.php +++ b/thirdparty/simpletest/http.php @@ -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); } }