Coding Standards: Use strict comparison and Yoda conditions in the root directory files.
Props pikamander2. Fixes #48965. Built from https://develop.svn.wordpress.org/trunk@47054 git-svn-id: http://core.svn.wordpress.org/trunk@46854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -105,7 +105,7 @@ if ( empty( $doing_wp_cron ) ) {
|
||||
* The cron lock (a unix timestamp set when the cron was spawned),
|
||||
* must match $doing_wp_cron (the "key").
|
||||
*/
|
||||
if ( $doing_cron_transient != $doing_wp_cron ) {
|
||||
if ( $doing_cron_transient !== $doing_wp_cron ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -138,14 +138,14 @@ foreach ( $crons as $timestamp => $cronhooks ) {
|
||||
do_action_ref_array( $hook, $v['args'] );
|
||||
|
||||
// If the hook ran too long and another cron process stole the lock, quit.
|
||||
if ( _get_cron_lock() != $doing_wp_cron ) {
|
||||
if ( _get_cron_lock() !== $doing_wp_cron ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( _get_cron_lock() == $doing_wp_cron ) {
|
||||
if ( _get_cron_lock() === $doing_wp_cron ) {
|
||||
delete_transient( 'doing_cron' );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user