Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: \Phalcon\Forms\Form->bind the whitelist doesn't work for getValue #15070

Closed
ivan-zolotavin opened this issue Jun 2, 2020 · 2 comments · Fixed by #15453
Closed

[BUG]: \Phalcon\Forms\Form->bind the whitelist doesn't work for getValue #15070

ivan-zolotavin opened this issue Jun 2, 2020 · 2 comments · Fixed by #15453
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: low Low status: unverified Unverified

Comments

@ivan-zolotavin
Copy link
Contributor

ivan-zolotavin commented Jun 2, 2020

Steps to reproduce the behavior:

$form = new \Phalcon\Forms\Form();
$form->add(new \Phalcon\Forms\Element\Text('nameFirst'));
$form->add(new \Phalcon\Forms\Element\Text('nameLast'));        
        
$data = [
    'test1' => 'test1',
    'nameFirst' => 'nameFirst',            
    'nameLast' => 'nameLast',
];

$entity = new \stdClass();
$white_list = ['nameFirst', 'nameLast'];
$form->bind($data, $entity, $white_list);        

// return TRUE - valid
var_dump($form->getValue('nameFirst') == 'nameFirst'); 
// return TRUE - NOT valid (not in whitelist/element list)
var_dump($form->getValue('test1') == 'test1');

Details

  • Phalcon version: 4.0.6
  • PHP Version: 7.4.6
@ivan-zolotavin ivan-zolotavin added bug A bug report status: unverified Unverified labels Jun 2, 2020
@zsilbi
Copy link
Member

zsilbi commented Oct 17, 2020

Related: #14203

@Jeckerson Jeckerson added the 5.0 The issues we want to solve in the 5.0 release label Mar 30, 2021
@niden niden linked a pull request May 3, 2021 that will close this issue
5 tasks
@niden niden added the status: low Low label May 3, 2021
@niden
Copy link
Member

niden commented May 3, 2021

Resolved in #15453

Thanks for reporting this.

@niden niden closed this as completed May 3, 2021
@niden niden moved this to Released in Phalcon v5 Aug 25, 2022
@niden niden added this to Phalcon v5 Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: low Low status: unverified Unverified
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants