Skip to content
Permalink
Browse files

removed function array_merge, and changed the variable name from to

  • Loading branch information...
gorogoroyasu committed Dec 7, 2016
1 parent e521dbc commit b944d831fa31ab282efc4dce8df9cf1fbace1bdf
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Controller/Component/PaginatorComponent.php
@@ -300,9 +300,9 @@ public function getDefaults($alias, $settings)
$settings = $settings[$alias];
}
$default = $this->config();
$maxLimit = isset($settings['maxLimit']) ? $settings['maxLimit'] : $default['maxLimit'];
$limit = isset($settings['limit']) ? $settings['limit'] : $default['limit'];
$defaults = $this->config();
$maxLimit = isset($settings['maxLimit']) ? $settings['maxLimit'] : $defaults['maxLimit'];
$limit = isset($settings['limit']) ? $settings['limit'] : $defaults['limit'];
if ($limit > $maxLimit) {
$limit = $maxLimit;
@@ -315,7 +315,7 @@ public function getDefaults($alias, $settings)
$settings['maxLimit'] = $maxLimit;
$settings['limit'] = $limit;
return array_merge($default, $settings);
return $settings + $defaults;
}
/**

0 comments on commit b944d83

Please sign in to comment.
You can’t perform that action at this time.