[wp-trac] [WordPress Trac] #39459: Database upgrade is triggered on AJAX request
WordPress Trac
noreply at wordpress.org
Mon Aug 28 09:46:38 UTC 2017
#39459: Database upgrade is triggered on AJAX request
-------------------------------------------------+-------------------------
Reporter: schlessera | Owner: schlessera
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Future
Component: Upgrade/Install | Release
Severity: normal | Version: 4.7
Keywords: good-first-bug has-patch 2nd- | Resolution:
opinion | Focuses:
-------------------------------------------------+-------------------------
Changes (by schlessera):
* keywords: good-first-bug has-patch => good-first-bug has-patch 2nd-
opinion
Comment:
Patch looks good and tests are still passing.
However, I would personally prefer to have the multi-line conditions be
split up before the boolean operator, so that these are the first element
for each line. I think this is easier to read and reason about:
{{{#!php
} elseif ( ! wp_doing_ajax()
&& get_option( 'db_version' ) != $wp_db_version
&& empty($_POST)
) {
}}}
I didn't find anything conclusive in the handbook, so not sure whether
this is defined somewhere.
Also, I couldn't find integration tests that test mechanisms like this.
What is the usual approach for testing something similar?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39459#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list