Looking more into this and it only happens on cake shells, calling the
save method of a model from a controller works ok but from a shell it
throws the error:

PHP Fatal error:  Call to undefined method Validation::getinstance()
in /var/www/html/cake/cake/libs/model/model.php on line 2332

The only workaround as I have sais is to set the validate parameter to false.

Should I open a bug report ?


Cheers,
--
Juan


On Fri, Dec 19, 2008 at 2:23 AM, Juan Luis Baptiste
<[email protected]> wrote:
> Hi,
>
> I'm trying to save data to a model from a console shell, very simple:
>
>
> if (!empty($user)) {
>        $user['ip_address'] = $ip;
>        $this->Userr->save($user);
> }
>
> But i't throwing this error:
>
> PHP Fatal error:  Call to undefined method Validation::getinstance()
> in /var/www/html/cake/cake/libs/model/model.php on line 2332
>
> but of course, the Validation::getInstance() method does exists, but
> with capital 'I', it seems the model is looking for it in small
> letter. It happens in both rc3 and rc4, this error is on rc4, on rc3
> is on line 2201. If I set the validate fields parameter to false the
> error doesn't happens and the record gets updated.
>
> Any ideas ?
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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