Changes between Initial Version and Version 1 of Ticket #49478, comment 3
- Timestamp:
- 02/01/2026 06:09:18 AM (7 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #49478, comment 3
initial v1 1 Tested on before patch and with [attachment:"49748.diff"] WordPress 7.0-alpha-61215-src. 2 `get_post_type_object()` returns an object for valid string inputs and null for all non-string values, so the issue is not reproducible functionally. 1 Tested both before patch and with [attachment:"49748.diff"] on WordPress 7.0-alpha-61215-src. 3 2 4 The behavior is already safe, but the validator still uses `is_scalar()` while the docblock specifies a string. Using `is_string()` would better match the documented contract and improve clarity/type safety.3 In both cases, `get_post_type_object()` returns an object for valid string inputs and null for all non-string values, so the issue is not reproducible functionally. 5 4 6 Removing `needs-testing` and adding `dev-feedback` since this appears to be a minor code quality improvement and may need maintainer input. 5 Before the patch the validator uses `is_scalar()`, and after the patch it uses `is_string()`. While the current behavior is already safe due to the array lookup, `is_string()` better matches the documented parameter type and improves clarity/type safety. 6 7 Removing `needs-testing` and adding `dev-feedback`, as this appears to be a minor code quality improvement that may need maintainer input.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)