Skip to content

Commit

Permalink
Avoid unnecessary Hash::merge() call.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Aug 17, 2014
1 parent bc68b86 commit df3148a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Network/Request.php
Expand Up @@ -156,13 +156,11 @@ class Request implements \ArrayAccess {
*/
public static function createFromGlobals() {
list($base, $webroot) = static::_base();
$sessionConfig = Hash::merge(
[
'defaults' => 'php',
'cookiePath' => $base ?: '/'
],
(array)Configure::read('Session')
);
$sessionConfig = (array)Configure::read('Session') + [
'defaults' => 'php',
'cookiePath' => $base ?: '/'
];

$config = array(
'query' => $_GET,
'post' => $_POST,
Expand Down

0 comments on commit df3148a

Please sign in to comment.