Re: passing array as parameters of redirect function
No array to string conversion errors? What kind of E_NOTICE error are
you getting.
On Sep 5, 3:27 pm, "Mariano C." <mariano.calan...@gmail.com> wrote:
> I haven't error message, line 106 and 107 are just the line of
> collection() function with debug instructions.
>
> On 5 Set, 21:04, "j.blotus" <j.blo...@gmail.com> wrote:
>
>
>
> > what is the specific error message you are getting. check lines 106
> > and 107 of your users_controller.php
>
> > On Sep 5, 12:38 pm, "Mariano C." <mariano.calan...@gmail.com> wrote:
>
> > > Then I've a method called collection
>
> > > function collection($username = null,
> > > $page = 1,
> > > $sort = array('Artist.name',
> > > 'Album.year'),
> > > $direction = array('ASC', 'ASC')
> > > )
> > > {
> > > debug(is_array($sort));
> > > debug($sort);
>
> > > }
>
> > > it's fully working, matter of fact:
> > > app/controllers/users_controller.php (line 106)
> > > 1
>
> > > app/controllers/users_controller.php (line 107)
> > > Array
> > > (
> > > [0] => Artist.name
> > > [1] => Album.year
> > > )
>
> > > Now I've remove() function, something like that:
> > > function removeFromCollection($album_user_id = null)
> > > {
> > > $this->redirect(array(
> > > 'controller'=>'users',
> > > 'action'=>'collection',
> > > $param['username'],
> > > $param['page'],
> > > array('Album.year', 'Artist.name'),
> > > array('ASC', 'ASC')
> > > ));
>
> > > }
>
> > > but when I call removeFromCollection() and redirect to collection is
> > > performed debug() output is:
> > > app/controllers/users_controller.php (line 106)
>
> > > app/controllers/users_controller.php (line 107)
> > > Array
>
> > > How can resolve this issue? How can I send array of element as
> > > parameter?
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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home