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::clear() variable never initialized #14217

Closed
scrnjakovic opened this issue Jun 27, 2019 · 1 comment
Closed

[BUG] Phalcon\Forms\Form::clear() variable never initialized #14217

scrnjakovic opened this issue Jun 27, 2019 · 1 comment
Labels
bug A bug report status: low Low

Comments

@scrnjakovic
Copy link
Contributor

scrnjakovic commented Jun 27, 2019

Condition on line 694 will never evaluate to true as variable field is null (v3.4.x)

public function clear(var fields = null) -> <Form>
{
var elements, element, data, field;
let data = this->_data;
if is_null(fields) {
let data = [];
} else {
if typeof fields == "array" {
for field in fields {
if isset data[field] {
unset data[field];
}
}
} else {
if isset data[field] {
unset data[field];
}
}
}

@SidRoberts
Copy link
Contributor

Fixed in #14218 and #14219.

@niden niden added 4.0 labels Jul 12, 2019
@niden niden added bug A bug report status: low Low and removed Bug - Low labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
None yet
Development

No branches or pull requests

3 participants