[wp-trac] [WordPress Trac] #41484: PHP 7.1 error in wp_star_rating()
WordPress Trac
noreply at wordpress.org
Sat Jul 29 20:30:22 UTC 2017
#41484: PHP 7.1 error in wp_star_rating()
-------------------------------------+-----------------------------
Reporter: afragen | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Plugins | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: administration
-------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* keywords: has-patch needs-testing dev-feedback => has-patch needs-
testing
Comment:
Apparently `$rating` can be a float (0..5 in .5 increments) if
`$r['type']` is `rating`. Core only uses `percent` type, but float usage
should also be documented.
I could not reproduce the actual warning with `'0'` as `$r['rating']`.
Reproduced with `''`, but the API seems to return the former. Seems like a
good fix anyway.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41484#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list