Skip to content

Fix #49510: boolean validation fails with FILTER_NULL_ON_FAILURE #124

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

Closed
wants to merge 1 commit into from

Conversation

zergin
Copy link

@zergin zergin commented Jul 9, 2012

Fix #49510: Fix empty strings validation (treat it as correct false value).

Fix empty strings validation (treat it as correct false value).
@smalyshev
Copy link
Contributor

It would be nice to add test to this.

@lstrojny
Copy link
Contributor

@zergin see @smalyshev comment about the test case.

@lstrojny
Copy link
Contributor

lstrojny commented Sep 2, 2012

Tried to apply this pull request but the fix doesn’t resolves the issue as the PHP_FILTER_TRIM_DEFAULT() returns on empty string (or bool(false)). I have a fix locally that needs another pairs of eyes with a testcase.

@smalyshev
Copy link
Contributor

@lstrojny it still has no test. If you want to apply it, please add test.

@lstrojny
Copy link
Contributor

lstrojny commented Sep 2, 2012

The fix wasn’t complete. Added a fix and a tests. Committed to PHP-5.4 and master.

@php-pulls
Copy link

Comment on behalf of lstrojny at php.net:

Bug fixed in PHP-5.4 and master.

@php-pulls php-pulls closed this Sep 2, 2012
@zergin
Copy link
Author

zergin commented Sep 2, 2012

Sorry for the very long time with out a response. I've just got back to this case just to see it fixed under an hour ago ;-) Thank you very much.

derickr added a commit that referenced this pull request Sep 14, 2022
- Fixed #124: Can't parse INT_MIN
- Added a new API, timelib_get_time_zone_offset_info, which reduces allocation
  speeding up algorithms (Alberto Massari)
- Accelerate the do_range_limit_days algorythm by advancing multiple months in
  a single call (Alberto Massari)

Including fixes from 2021.17:

- Fixed 'const' and other compiler warnings
- Use new 'PACKRAT' format to prevent old timestamps from becoming incorrect
- New 2022b data file
- Fixed PHP GH-9165: strtotime translates a date-time with DST/non-DST hour
  differently
derickr added a commit that referenced this pull request Sep 14, 2022
iluuu1994 added a commit that referenced this pull request Sep 15, 2022
* PHP-8.2:
  Backport skipping of ext/date/tests/gh-124.phpt on ASAN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants