PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | stripe/models/FrmTransLiteDb.php +7 -8 6.28 → trunk View file →
@@ -34,10 +34,9 @@
34 34 if ( ! $old_db_version ) {
35 35 $old_db_version = get_option( $this->db_opt_name );
36 36 }
37 37
38 - // phpcs:ignore Universal.Operators.StrictComparisons
39 - if ( $this->db_version == $old_db_version ) {
38 + if ( $this->db_version === (int) $old_db_version ) {
40 39 return;
41 40 }
42 41
43 42 global $wpdb;
@@ -286,11 +285,9 @@
286 285 *
287 286 * @return void
288 287 */
289 288 private function fill_values( $values, &$new_values ) {
290 - $defaults = $this->get_defaults();
291 -
292 - foreach ( $defaults as $val => $default ) {
289 + foreach ( $this->get_defaults() as $val => $default ) {
293 290 if ( isset( $values[ $val ] ) ) {
294 291 if ( $default['sanitize'] === 'float' ) {
295 292 $new_values[ $val ] = (float) $values[ $val ];
296 293 } elseif ( ! empty( $default['sanitize'] ) ) {
@@ -312,12 +309,14 @@
312 309 private function migrate_data( $old_db_version ) {
313 310 $migrations = array( 4 );
314 311
315 312 foreach ( $migrations as $migration ) {
316 - if ( $this->db_version >= $migration && $old_db_version < $migration ) {
317 - $function_name = 'migrate_to_' . $migration;
318 - $this->$function_name();
313 + if ( $this->db_version < $migration || $old_db_version >= $migration ) {
314 + continue;
319 315 }
316 +
317 + $function_name = 'migrate_to_' . $migration;
318 + $this->$function_name();
320 319 }
321 320 }
322 321
323 322 /**