Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fix Zend\Form\Element\Number $inclusive is always true (Fix for #5549) #5551

Merged
merged 2 commits into from Feb 20, 2014

Conversation

samsonasik
Copy link
Contributor

Fixes #5549

@@ -48,7 +48,7 @@ protected function getValidators()
'locale' => 'en_US', // HTML5 uses "100.01" format
));

$inclusive = true;
$inclusive = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it a BC?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bakura10 sorry, I mean, I think it's not break BC, it is a default value, in next line, there is a condition if has attributes['inclusive'], then assign with that attribute value. any suggestion ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if inclusive option is not set? The default inclusive then reversed :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bakura10 fixed ;). unit test updated. let me know if I missed something ;)

@bakura10
Copy link
Contributor

better :)

Maks3w added a commit that referenced this pull request Feb 20, 2014
Maks3w added a commit that referenced this pull request Feb 20, 2014
Maks3w added a commit that referenced this pull request Feb 20, 2014
@Maks3w Maks3w merged commit d2e7bf6 into zendframework:master Feb 20, 2014
@samsonasik samsonasik deleted the fix/inclusive branch February 20, 2014 08:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ZF2] Zend\Form\Element\Number
3 participants