fix: [appController:harvestParameters] Always support page and limit parameters while harvesting parameters

There is not point in not always supporting these two parameters
pull/9529/head
Sami Mokaddem 2024-01-24 12:42:37 +01:00
parent a0e8bed72a
commit c5737d6f67
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 8 additions and 0 deletions

View File

@ -995,6 +995,14 @@ class AppController extends Controller
*/
protected function _harvestParameters($options, &$exception = null, $data = [])
{
if (!empty($options['paramArray'])) {
if (!in_array('page', $options['paramArray'])) {
$options['paramArray'][] = 'page';
}
if (!in_array('limit', $options['paramArray'])) {
$options['paramArray'][] = 'limit';
}
}
$request = $options['request'] ?? $this->request;
if ($request->is('post')) {
if (empty($request->data)) {