I tried something like that too, but couldn't get it to work. Your suggested patch also still throws the same warning. Right now I just avoided using the $form->create() and just set the form "by hand", which is fine also.
Somehow all the checks on the status of $fields on line 98 of the formHelper didn't work, even though a print_r only shows $fields- >value as an empty array it should be easy. Probably overlooking something obvious I'll take another stab at it later this weekend or so. But right now I have a site to bake.... cheers :jc On 9 Mrz., 17:54, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > This is related to: > > https://trac.cakephp.org/ticket/2200 > > Try this. Change this: > > $fields = $object->loadInfo(); > $data = array( > 'fields' => array_combine($fields->extract('{n}.name'), > $fields->extract('{n}.type')), > > 'key' => $object->primaryKey, > 'validates' => (ife(empty($object->validate), array(), > array_keys($object->validate))) > ); > > To: > > $fields = $object->loadInfo(); > > $data = array( > 'fields' => ife((is_array($fields->value) && > isset($fields->value[0]), array_combine($fields->extract('{n}.name'), > $fields->extract('{n}.type')), array()), > > 'key' => $object->primaryKey, > 'validates' => (ife(empty($object->validate), array(), > array_keys($object->validate))) > ); > > } > > If it works, submit a patch for it. > > -MI > > --------------------------------------------------------------------------- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -----Mensaje original----- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de jcsiegrist > Enviado el: Viernes, 09 de Marzo de 2007 01:29 p.m. > Para: Cake PHP > Asunto: Problem using $form->create() with a model having var $useTable = > false (cake 1.2) > > I'm trying to implement a simple form to be used for emailing. I'm > using a model with var $useTable = false to take advantage of the > validation features. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---