mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Completing the round of micro optimization, it was fun while it lasted
This commit is contained in:
parent
c431ddd22c
commit
6de52f795f
3 changed files with 4 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -143,7 +143,8 @@ class Dispatcher {
|
|||
$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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,7 +46,7 @@ class Set {
|
|||
$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;
|
||||
|
|
Loading…
Add table
Reference in a new issue