|
|
@@ -494,22 +494,20 @@ class PaginatorHelper extends Helper
|
|
|
*
|
|
|
* @param array $options Pagination/URL options array
|
|
|
* @param string|null $model Which model to paginate on
|
|
|
- * @param array|bool $urlOptions Array of options or bool `fullBase` for BC reasons.
|
|
|
+ * @param array $urlOptions Array of options
|
|
|
* The bool version of this argument is *deprecated* and will be removed in 4.0.0
|
|
|
* @return string By default, returns a full pagination URL string for use in non-standard contexts (i.e. JavaScript)
|
|
|
* @link https://book.cakephp.org/3.0/en/views/helpers/paginator.html#generating-pagination-urls
|
|
|
*/
|
|
|
- public function generateUrl(array $options = [], $model = null, $urlOptions = false)
|
|
|
+ public function generateUrl(array $options = [], $model = null, $urlOptions = [])
|
|
|
{
|
|
|
- if (!is_array($urlOptions)) {
|
|
|
+ if (is_bool($urlOptions)) {
|
|
|
$urlOptions = ['fullBase' => $urlOptions];
|
|
|
- if (func_num_args() == 3) {
|
|
|
- deprecationWarning(
|
|
|
- 'Passing an bool as third argument into PaginatorHelper::generateUrl() is deprecated ' .
|
|
|
- 'and will be removed in 4.0.0 . ' .
|
|
|
- 'Pass an array instead.'
|
|
|
- );
|
|
|
- }
|
|
|
+ deprecationWarning(
|
|
|
+ 'Passing a boolean value as third argument into PaginatorHelper::generateUrl() is deprecated ' .
|
|
|
+ 'and will be removed in 4.0.0 . ' .
|
|
|
+ 'Pass an array instead.'
|
|
|
+ );
|
|
|
}
|
|
|
$urlOptions += [
|
|
|
'escape' => true,
|