#58683 closed defect (bug) (fixed)
Cast return value to int in functions that use ceil()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.5 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
The use-case expects an integer to be returned, but the count() function returns a float; cast the returned value to an integer.
get_comment_pages_count()wp_embed_defaults()get_oembed_response_data()
This was mentioned by Sergey in https://core.trac.wordpress.org/ticket/55654#comment:9, and subsequent ticket #56800 aimed to update the tests, but the functions do not appear to have been fixed.
Change History (10)
This ticket was mentioned in PR #4768 on WordPress/wordpress-develop by @crstauf.
3 years ago
#1
- Keywords has-patch added
#3
@
2 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 6.5
- Owner set to audrasjb
- Status changed from new to accepted
Looks good to me, thanks!
Moving for 6.5 consideration.
@audrasjb commented on PR #4768:
2 years ago
#4
Looks like Performance tests are failing with this change 👀
This ticket was mentioned in PR #6134 on WordPress/wordpress-develop by @swissspidy.
2 years ago
#5
Supersedes https://github.com/WordPress/wordpress-develop/pull/4768 as it addresses more places as mentioned originally at https://core.trac.wordpress.org/ticket/55654#comment:9
Trac ticket: https://core.trac.wordpress.org/ticket/58683
@swissspidy commented on PR #6134:
2 years ago
#7
@swissspidy commented on PR #4768:
2 years ago
#8
Committed in https://core.trac.wordpress.org/changeset/57648
Handful of functions use
ceil(), which returns a float, but the functions expect an integer. Change those functions to castceil()to an integer.Trac ticket: https://core.trac.wordpress.org/ticket/58683