#5981: Validation always passing with on-the-fly model import & PHP Version
4.4.4-8+etch6
--------------------------+-------------------------------------------------
Reporter: sveggiani | Type: Bug
Status: new | Priority: Medium
Milestone: 1.2.x.x | Component: Validation
Version: 1.2 Final | Severity: Normal
Keywords: | Php_version: PHP 4 >= 4.3.2
Cake_version: |
--------------------------+-------------------------------------------------
In my production server, running PHP 4.4.4-8+etch6 and importing the model
with:
{{{
if (App::import('Model', 'Feedback')) {
$this->Feedback = new Feedback();
}
}}}
when I try to execute the validation with:
{{{
if ( !empty($this->data) ) :
if ( $this->Feedback->create($this->data) &&
$this->Feedback->validates() ) : ......
}}}
the validation of the model is always PASSED.
But if I import the models with the $uses variable in the controller it
works Ok.
{{{
var $uses = array('Division','Feedback');
}}}
It's my first (potential) bug reported, so if you need more information
about the issue feel free to ask.
--
Ticket URL: <https://trac.cakephp.org/ticket/5981>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets 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/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---