#1404: sfValidatorDoctrineUnique typo
-----------------------------------+----------------------------------------
Reporter: mcz | Owner: jwage
Type: defect | Status: new
Priority: critical | Milestone: 1.0.0
Component: sfDoctrinePlugin | Version: 0.11
Keywords: | Has_test: 1
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------
in symfony 1.1 forms i tried to use the following validator:
{{{
'username' => new sfValidatorAnd(array(
new
sfValidatorDoctrineUnique(array('model' => 'User', 'column' =>
'username')),
), array('required' => true)),
}}}
It doesn work because in the sfValidatorDoctrineUnique.class.php on line
80:
{{{
$q->addWhere('a.' . $colName . ' = ?', $values[$column]);
}}}
And since $values is not an array the output of $values[$columns] is not
good. I tried and tested it, line 80 should be:
{{{
$q->addWhere('a.' . $colName . ' = ?', $values);
}}}
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1404>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" 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.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---