Changeset 30253 in spip-zone for _plugins_/simpletest


Ignore:
Timestamp:
Jul 27, 2009, 3:26:42 AM (12 years ago)
Author:
gilles.vincent@…
Message:

[30252] suite : split est deprecie en 5.3.0

Location:
_plugins_/simpletest/simpletest
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/simpletest/simpletest/http.php

    r24737 r30253  
    317317        $this->_authentication = false;
    318318        $this->_realm = false;
    319         foreach (split("\r\n", $headers) as $header_line) {
     319        foreach (preg_split(",\r\n,", $headers) as $header_line) {
    320320            $this->_parseHeaderLine($header_line);
    321321        }
     
    458458     */
    459459    function _parseCookie($cookie_line) {
    460         $parts = split(";", $cookie_line);
     460        $parts = explode(";", $cookie_line);
    461461        $cookie = array();
    462462        preg_match('/\s*(.*?)\s*=(.*)/', array_shift($parts), $cookie);
     
    522522            $this->_headers = &new SimpleHttpHeaders($raw);
    523523        } else {
    524             list($headers, $this->_content) = split("\r\n\r\n", $raw, 2);
     524            list($headers, $this->_content) = preg_split(",\r\n\r\n,", $raw, 2);
    525525            $this->_headers = &new SimpleHttpHeaders($headers);
    526526        }
  • _plugins_/simpletest/simpletest/url.php

    r24737 r30253  
    107107        if (preg_match('/^([^\/]*)@(.*)/', $url, $matches)) {
    108108            $url = $prefix . $matches[2];
    109             $parts = split(":", $matches[1]);
     109            $parts = explode(":", $matches[1]);
    110110            return array(
    111111                    urldecode($parts[0]),
     
    185185        $this->_raw = $raw;
    186186        $request = new SimpleGetEncoding();
    187         foreach (split("&", $raw) as $pair) {
     187        foreach (explode("&", $raw) as $pair) {
    188188            if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
    189189                $request->add($matches[1], urldecode($matches[2]));
  • _plugins_/simpletest/simpletest/web_tester.php

    r24737 r30253  
    191191     */
    192192    function _findHeader($compare) {
    193         $lines = split("\r\n", $compare);
     193        $lines = preg_split(",\r\n,", $compare);
    194194        foreach ($lines as $line) {
    195195            if ($this->_testHeaderLine($line)) {
     
    207207     */
    208208    function _testHeaderLine($line) {
    209         if (count($parsed = split(':', $line, 2)) < 2) {
     209        if (count($parsed = explode(':', $line, 2)) < 2) {
    210210            return false;
    211211        }
Note: See TracChangeset for help on using the changeset viewer.