[wp-trac] [WordPress Trac] #57680: comment return description not define
WordPress Trac
noreply at wordpress.org
Fri Feb 10 23:36:09 UTC 2023
#57680: comment return description not define
-------------------------+-------------------------------------
Reporter: patelmohip | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: docs, coding-standards
-------------------------+-------------------------------------
Comment (by jrf):
@patelmohip Thanks for the ticket and patch.
{{{#!php
<?php
@return true|array True if automatic_updater is disable and
wp_installing() available. Array with the test results.
}}}
If I look at the code, this is incorrect. The return value should always
be a boolean. `true` for the first two code paths, `true|false` for the
last.
And yes, while a filter can return anything, the filter is documented to
filter a `bool` value, so should return a `bool`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57680#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list