mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing issues caused by not accessing the request object correctly.
This commit is contained in:
parent
18bb5f6b8b
commit
01894b315f
2 changed files with 6 additions and 6 deletions
|
@ -1039,7 +1039,7 @@ class Controller extends Object {
|
|||
), E_USER_WARNING);
|
||||
return array();
|
||||
}
|
||||
$options = array_merge($this->request->params, $this->params['url'], $this->passedArgs);
|
||||
$options = array_merge($this->request->params, $this->request->params['url'], $this->passedArgs);
|
||||
|
||||
if (isset($this->paginate[$object->alias])) {
|
||||
$defaults = $this->paginate[$object->alias];
|
||||
|
@ -1170,11 +1170,11 @@ class Controller extends Object {
|
|||
'defaults' => array_merge(array('limit' => 20, 'step' => 1), $defaults),
|
||||
'options' => $options
|
||||
);
|
||||
if (!isset($this->request['paging'])) {
|
||||
$this->request['paging'] = array();
|
||||
if (!isset($this->request->params['paging'])) {
|
||||
$this->request->params['paging'] = array();
|
||||
}
|
||||
$this->request['paging'] = array_merge(
|
||||
(array)$this->request['paging'],
|
||||
$this->request->params['paging'] = array_merge(
|
||||
(array)$this->request->params['paging'],
|
||||
array($object->alias => $paging)
|
||||
);
|
||||
|
||||
|
|
|
@ -773,7 +773,7 @@ class ControllerTest extends CakeTestCase {
|
|||
'recursive' => -1
|
||||
);
|
||||
$conditions = array();
|
||||
$result = $Controller->paginate('ControllerPost',$conditions);
|
||||
$result = $Controller->paginate('ControllerPost', $conditions);
|
||||
$expected = array(
|
||||
array(
|
||||
'ControllerPost' => array(
|
||||
|
|
Loading…
Add table
Reference in a new issue