Sunday, July 29, 2012

Re: [2.1] Problem with webservices

$this->set(array(
                'people' => $people,
                '_serialize' => array('person')
            ));

Do we need serialize?? 

Just try $this->set('person', $people);

And in view 
Echo json_encode($person);



=============================
Walter Raponi
Din S.r.l.
Via Donato Menichella 304
00156 Roma - Italy

Tel  0641227662
Fax 0641227664

Il giorno 29/lug/2012, alle ore 19:01, "Mariano C." <mariano.calandra@gmail.com> ha scritto:

Yes I've read that message, but I don't understand what it means. Why I get that error only in json and xml output and not in a normal view?

Il giorno domenica 29 luglio 2012 18:35:37 UTC+2, rchavik ha scritto:


On Sunday, July 29, 2012 10:35:23 PM UTC+7, Mariano C. wrote:
Nothing change, I got the same error. :(


Read the error message:

<b>Notice</b> (8)</a>: Undefined index: person [<b>CORE\Cake\View\JsonView.php</b>, line <b>89</b>

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
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

No comments: