[wp-trac] [WordPress Trac] #52217: Fix code issues identified by PHPStan
WordPress Trac
noreply at wordpress.org
Sun Nov 3 23:01:54 UTC 2024
#52217: Fix code issues identified by PHPStan
-------------------------+-------------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
-------------------------+-------------------------------
Comment (by SergeyBiryukov):
In [changeset:"59337" 59337]:
{{{
#!CommitTicketReference repository="" revision="59337"
Coding Standards: Explicitly return `false` in magic `__isset()` methods.
This commit fixes an issue where some magic `__isset()` methods were
potentially returning `void` (if the prop is not in an allow-listed array
of fields) instead of an explicit boolean `false`.
Addressed methods:
* `WP_Comment::__isset()`
* `WP_Query::__isset()`
Follow-up to [28523], [31151], [34583], [34599].
Props justlevine.
See #52217.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52217#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list