[wp-trac] [WordPress Trac] #58683: Cast return value to int in functions that use ceil()
WordPress Trac
noreply at wordpress.org
Sun Feb 18 18:59:40 UTC 2024
#58683: Cast return value to int in functions that use ceil()
------------------------------+-----------------------
Reporter: crstauf | Owner: audrasjb
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.5
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-----------------------
Comment (by SergeyBiryukov):
In [changeset:"57653" 57653]:
{{{
#!CommitTicketReference repository="" revision="57653"
Tests: Use `assertSame()` in `WP_Query` tests involving
`::$max_num_pages` property.
This ensures that not only the return values match the expected results,
but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should
generally be preferred to `assertEquals()` where appropriate, to make the
tests more reliable.
Follow-up to [48937], [54402], [54768], [57648].
Props costdev.
See #58683, #59655.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58683#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list