IWe're working on an upgrade to 1.26 stable and are finding a lot of
references to issues in the pagination helper in which parameter #2 to
array_merge is not an array. var_dump shows they are indeed arrays,
and this is usually on the url parameter.

See refs to url lines 258 and 344 in the paginator helper code.

The error is flagged when using paginator helper methods where url is
set using syntax such as
$options = array( 'url' => $somevar);

Casting the refs in the paginator code to be (array) makes everything
work properly.
344 org: $url = array_merge(array('page' => $paging['page'] + ($which
== 'Prev' ? $step * -1 : $step)), $url);
344 fix: $url = array_merge(array('page' => $paging['page'] + ($which
== 'Prev' ? $step * -1 : $step)), (array)$url);

So does changing the input in the view to
$options = array(array( 'url' => $somevar));

Looking at the spec for the options in those functions it does not
appear that urls must be an array within the options array, but is
this stated elsewhere?

Just trying to get it right before hitting a bunch of pagination code
for updates. I noticed in an older release that in internal function
in the paginator helper called am() used to be used and it did some
manipulation which made our original syntax work. Should we input a PR
into the system or are all our input references actually wrong?

Other than plugging in a new cake core behind our 10,000 lines of cake
code how would we know this type of change was out there? Is there a
summary list that shows API changes and functions deprecated across
releases to ease forward migration of large code bases? Bashing
through the migration like this is quite painful :(

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to