[wp-trac] [WordPress Trac] #58683: Cast return value to int in functions that use ceil()
WordPress Trac
noreply at wordpress.org
Fri Jun 30 12:17:04 UTC 2023
#58683: Cast return value to int in functions that use ceil()
--------------------------+-----------------------------
Reporter: crstauf | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58683>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list