Fixing errors caused by accessing things that don't exist.

This commit is contained in:
mark_story 2010-11-13 23:55:24 -05:00
parent 6c8c7ca4a5
commit 6073ac5dfa
2 changed files with 3 additions and 3 deletions

View file

@ -1039,7 +1039,7 @@ class Controller extends Object {
), E_USER_WARNING);
return array();
}
$options = array_merge($this->request->params, $this->request->params['url'], $this->passedArgs);
$options = array_merge($this->request->params, $this->request->query, $this->passedArgs);
if (isset($this->paginate[$object->alias])) {
$defaults = $this->paginate[$object->alias];

View file

@ -757,9 +757,9 @@ class ControllerTest extends CakeTestCase {
* @access public
*/
function testPaginateFieldsDouble(){
$Controller = new Controller();
$Controller = new Controller($this->getMock('CakeRequest'));
$Controller->uses = array('ControllerPost');
$Controller->request->params['url'] = array();
$Controller->request->query = array();
$Controller->constructClasses();
$Controller->paginate = array(