[wp-trac] [WordPress Trac] #63445: Replace value casting with ! empty() check for positive value validation
WordPress Trac
noreply at wordpress.org
Wed May 14 07:02:26 UTC 2025
#63445: Replace value casting with ! empty() check for positive value validation
--------------------------+-------------------------------
Reporter: dilipbheda | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
--------------------------+-------------------------------
Comment (by dilipbheda):
@swissspidy Should we use the following example instead of `empty()`?
{{{
( isset( $_POST['position'] ) && $_POST['position'] > 0 )
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63445#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list