Hello i'm using the las version of cakephp1.2

i have a problem with Model->save

this is my source
---
                if(!empty($this->data)) {
                        foreach ($this->data["Tiposviajesusuario"] as $tipo) {
                                        $t["Tiposviajesusuario"]["usuario_id"] 
= $u["id"];
                                        $t["Tiposviajesusuario"]["tipo_id"] = 
$tipo;
                                        $this->Tiposviajesusuario->create();
                                        $this->Tiposviajesusuario->validates();
                                        $this->Tiposviajesusuario->save($t);
                                        $t = null;
                        }
                }
----

i got this error

Notice (8): Undefined index:  tiposviajesusuario [CORE\cake\libs\model
\model.php, line 1093]
Warning (2): array_key_exists() [function.array-key-exists]: The
second argument should be either an array or an object [CORE\cake\libs
\model\model.php, line 1
Notice (8): Undefined index:  tiposviajesusuario [CORE\cake\libs\model
\model.php, line 1099]
Warning (2): array_keys() [function.array-keys]: The first argument
should be an array [CORE\cake\libs\model\model.php, line 1099]

and the pr($t);

is

Array
(
    [Tiposviajesusuario] => Array
        (
            [usuario_id] => 1
            [tipo_id] => 1
        )

)


i need help pls :D



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to