PluginProbe
ElasticPress / 5.3.5
ElasticPress v5.3.5
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
← All changes | includes/classes/Command/Utility.php +5 -7 4.5.05.3.5 View file →
@@ -7,9 +7,9 @@
7 7 */
8 8
9 9 namespace ElasticPress\Command;
10 10
11 -use \WP_CLI;
11 +use WP_CLI;
12 12
13 13 if ( ! defined( 'ABSPATH' ) ) {
14 14 exit; // Exit if accessed directly.
15 15 }
@@ -61,9 +61,9 @@
61 61 * @return float Time spent so far
62 62 */
63 63 public static function timer_stop( $precision = 3 ) {
64 64 $diff = microtime( true ) - self::$time_start;
65 - return (float) number_format( (float) $diff, $precision );
65 + return (float) number_format( (float) $diff, $precision, '.', '' );
66 66 }
67 67
68 68 /**
69 69 * Starts the timer.
@@ -157,23 +157,21 @@
157 157 * so that the value from the local memory is discarded.
158 158 */
159 159 $should_interrupt_sync = wp_cache_get( $transient, 'transient', true );
160 160 } else {
161 - $options = $wpdb->options;
162 -
161 + // phpcs:disable WordPress.DB.DirectDatabaseQuery
163 162 $should_interrupt_sync = $wpdb->get_var(
164 - // phpcs:disable
165 163 $wpdb->prepare(
166 164 "
167 165 SELECT option_value
168 - FROM $options
166 + FROM $wpdb->options
169 167 WHERE option_name = %s
170 168 LIMIT 1
171 169 ",
172 170 "_transient_{$transient}"
173 171 )
174 - // phpcs:enable
175 172 );
173 + // phpcs:enable WordPress.DB.DirectDatabaseQuery
176 174 }
177 175
178 176 return $should_interrupt_sync ? (bool) $should_interrupt_sync : null;
179 177 }