Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #54801


Ignore:
Timestamp:
01/12/2022 03:43:18 PM (3 years ago)
Author:
schlessera
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54801

    • Property Keywords has-patch added
  • Ticket #54801 – Description

    initial v3  
    77This 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.
    88
    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.~~
    1010
    11 **Performance considerations**
     11~~**Performance considerations**~~
    1212
    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.~~
    1414
    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.~~
    1616
    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
     19I suggest using `$wpdb->suppress_errors()` around the two problematic calls to avoid showing these errors.