Skip to content

Commit

Permalink
Replace function preg_split by explode when possible.
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Story <mark@mark-story.com>
  • Loading branch information
jrbasso authored and markstory committed Nov 21, 2009
1 parent df9e1e0 commit 911a99b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cake/dispatcher.php
Expand Up @@ -515,7 +515,7 @@ function uri() {
if (key($_GET) && strpos(key($_GET), '?') !== false) {
unset($_GET[key($_GET)]);
}
$uri = preg_split('/\?/', $uri, 2);
$uri = explode('?', $uri, 2);

if (isset($uri[1])) {
parse_str($uri[1], $_GET);
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/http_socket.php
Expand Up @@ -854,7 +854,7 @@ function parseCookies($header) {
foreach ((array)$header['Set-Cookie'] as $cookie) {
if (strpos($cookie, '";"') !== false) {
$cookie = str_replace('";"', "{__cookie_replace__}", $cookie);
$parts = str_replace("{__cookie_replace__}", '";"', preg_split('/\;/', $cookie));
$parts = str_replace("{__cookie_replace__}", '";"', explode(';', $cookie));
} else {
$parts = preg_split('/\;[ \t]*/', $cookie);
}
Expand Down

0 comments on commit 911a99b

Please sign in to comment.