Mam taki kod we formularzu:
class RechargeForm extends BaseTpCodesForm
{
public function configure()
{
unset($this['sn_club'], $this['sn_code'] , $this['is_active'], $this['is_blocked'], $this['is_deleted'], $this['created_at'], $this['id']);
$this->widgetSchema['token_code'] = new sfWidgetFormInput();
$this->validatorSchema['token_code'] = new sfValidatorAnd
(array(new sfValidatorString
(array('min_length' => 20, 'max_length' => 20
)), new sfValidatorRegex
(array('pattern' => '/^[0-9a-z]+$/i'))), array('halt_on_error' => true), array('invalid' => 'Niepoprawny kod.', 'required' => 'Pole wymagane.'));
$this->validatorSchema->setPostValidator(new sfValidatorPropelChoice
(array('model' => 'TpCodes', 'column' => 'token_code', 'criteria' => TpCodesPeer
::retrieveByTokenCode($this['token_code']->getValue())), array('invalid' => 'Niepoprawny kod.', 'required' => 'Pole wymagane.')));
$this->widgetSchema->setLabels(array('token_code' => 'Twój kod')); }
}
wszystko działa, wartość się waliduje tak jak powinn, ale pokazuje się błąd:
Notice
: Array to string conversion in
/usr
/share
/php5
/PEAR
/symfony
/plugins
/sfPropelPlugin
/lib
/vendor
/propel
/util
/DebugPDOStatement
.php on line
80
mianowicie nie wiem czy dobrze pozyskuję wartość z pola "token_code" w sfValidatorPropelChoice() ?