Skip to content

Commit

Permalink
Make 3.3 compatible.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Aug 17, 2016
1 parent 07a579c commit 8038fb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Controller/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ class Controller extends ShimController {
*
* @param \Cake\ORM\Table|string|\Cake\ORM\Query|null $object Table to paginate
* (e.g: Table instance, 'TableName' or a Query object)
* @param array $settings Settings
*
* @return \Cake\ORM\ResultSet Query results
*/
public function paginate($object = null) {
public function paginate($object = null, array $settings = []) {
$defaultSettings = (array)Configure::read('Paginator');
if ($defaultSettings) {
$this->paginate += $defaultSettings;
}
return parent::paginate($object);
return parent::paginate($object, $settings);
}

}
2 changes: 1 addition & 1 deletion tests/TestCase/Controller/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ControllerTest extends TestCase {
public $fixtures = ['plugin.Tools.ToolsUsers'];

/**
* @var Cake\Controller\Controller
* @var \Cake\Controller\Controller
*/
public $Controller;

Expand Down

0 comments on commit 8038fb2

Please sign in to comment.