Ok can you do us bakers a favour and report this to https://trac.cakephp.org
?
This is what you should report:
When using a model that has no table defined (with var $useTable = false)
issuing:
$this->Model->create($this->data);
When $this->data is available and valid, throws:
Notice: Undefined offset: 0 in
/home/sajt/Projectek/mediabazar2/cake/libs/model/model.php on line 885
Warning: array_key_exists() [function.array-key-exists]: The second
argument should be either an array or an object in
/home/sajt/Projectek/mediabazar2/cake/libs/model/model.php on line 885
FIX:
On line 885 of cake/libs/model/model.php change:
if (array_key_exists('default', $cols->value[0])) {
to:
if (is_array($cols->value) && array_key_exists('default', $cols->value[0]))
{
-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: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de Ámon Tamás
Enviado el: Martes, 06 de Marzo de 2007 08:34 a.m.
Para: [email protected]
Asunto: Re: email form
Yes. It is working :) The 1.2 is very good!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---