Changes between Initial Version and Version 1 of Ticket #51525, comment 3
- Timestamp:
- 10/15/2020 08:12:04 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51525, comment 3
initial v1 25 25 Once PHP 8 becomes the minimum PHP version for WordPress (in twenty years or so), union types could be used in the hooked-in functions and a `try-catch` be added to `apply_filters()` to catch mismatches, but that's another matter. 26 26 27 Actually, adding the `try-catch` in `apply_filters()` already with a ''doing it wrong'' would probably not be a bad idea anyway as it would prevent potential fatal errors when plugins already choose to drop PHP 5.6 support and add PHP 7 type declarations, but to be fair, that is outside the scope of this ticket and deserves it own discussion.27 Actually, adding the `try-catch` in `apply_filters()` already with a ''doing it wrong'' would probably not be a bad idea anyway as it would prevent potential fatal errors when plugins already choose to drop PHP 5.6 support and add PHP 7 type declarations, but to be fair, that is outside the scope of this ticket and deserves its own discussion. 28 28 29 29