Skip to content

Commit

Permalink
Completing the round of micro optimization, it was fun while it lasted
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 7, 2010
1 parent c431ddd commit 6de52f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Network/CakeRequest.php
Expand Up @@ -16,7 +16,7 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('Set', 'Core');
App::uses('Set', 'Utility');

/**
* A class that helps wrap Request information and particulars about a single request.
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Routing/Dispatcher.php
Expand Up @@ -143,7 +143,8 @@ protected function _isPrivateAction($request) {
$privateAction = in_array($prefix, $prefixes);
}
}
return $privateAction && ! in_array($request->params['action'], get_class_methods('Controller'));

return $privateAction || in_array($request->params['action'], get_class_methods('Controller'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Set.php
Expand Up @@ -46,7 +46,7 @@ public static function merge($arr1, $arr2 = null) {
$r = (array)current($args);
while (($arg = next($args)) !== false) {
foreach ((array)$arg as $key => $val) {
if (is_array($val) && isset($r[$key]) && is_array($r[$key])) {
if (!empty($r[$key]) && is_array($r[$key])) {
$r[$key] = Set::merge($r[$key], $val);
} elseif (is_int($key)) {
$r[] = $val;
Expand Down

0 comments on commit 6de52f7

Please sign in to comment.