Changes between Initial Version and Version 3 of Ticket #54801
- Timestamp:
- 01/12/2022 03:43:18 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #54801
- Property Keywords has-patch added
-
Ticket #54801 – Description
initial v3 7 7 This is an operation that is commonly done via WP-CLI, and while the errors do not change the outcome (i.e. the check will fail either way), they do fill up the logs unnecessarily for an operation that should be safe to do. 8 8 9 I'd suggest doing a quick check on these fundamental operations to see if the tables are present before manipulating them. 9 ~~I'd suggest doing a quick check on these fundamental operations to see if the tables are present before manipulating them.~~ 10 10 11 **Performance considerations** 11 ~~**Performance considerations**~~ 12 12 13 The suggested fix (see PR that will follow) adds two DB requests which, even though they should be very cheap, should be properly cached to ensure no important negative performance impact. 13 ~~The suggested fix (see PR that will follow) adds two DB requests which, even though they should be very cheap, should be properly cached to ensure no important negative performance impact.~~ 14 14 15 The alternative would be to change the logic in WPDB so that it can be silenced for operations that are known to be failing in an expected manner. However, that seems like a major change throughout multiple parts of the code. 15 ~~The alternative would be to change the logic in WPDB so that it can be silenced for operations that are known to be failing in an expected manner. However, that seems like a major change throughout multiple parts of the code.~~ 16 16 17 I'm happy to discuss alternative ways of fixing this, as I'm not too happy with introducing two DB requests like that. 17 ~~I'm happy to discuss alternative ways of fixing this, as I'm not too happy with introducing two DB requests like that.~~ 18 19 I suggest using `$wpdb->suppress_errors()` around the two problematic calls to avoid showing these errors.