#58683 closed defect (bug) (fixed)
Cast return value to int in functions that use ceil()
| Reported by: | crstauf | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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
@
3 years ago
- Keywords commit added
- Milestone Awaiting Review → 6.5
- Owner set to
- Status new → 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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