| @@ -42,9 +42,9 @@ | ||
| 42 | 42 | |
| 43 | 43 | $max_slug_value = 2147483647; |
| 44 | 44 | // We want to have at least 2 characters in the slug. |
| 45 | 45 | $min_slug_value = 37; |
| 46 | - $key = base_convert( random_int( $min_slug_value, $max_slug_value ), 10, 36 ); | |
| 46 | + $key = base_convert( rand( $min_slug_value, $max_slug_value ), 10, 36 ); | |
| 47 | 47 | |
| 48 | 48 | $style = array( |
| 49 | 49 | 'post_type' => FrmStylesController::$post_type, |
| 50 | 50 | 'ID' => '', |
| @@ -99,9 +99,9 @@ | ||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | // Custom CSS is no longer used from the default style, but it is still checked if the Global Setting is missing. |
| 102 | 102 | // Preserve the previous value in case Custom CSS has not been saved as a Global Setting yet. |
| 103 | - $custom_css = $new_instance['post_content']['custom_css'] ?? ''; | |
| 103 | + $custom_css = isset( $new_instance['post_content']['custom_css'] ) ? $new_instance['post_content']['custom_css'] : ''; | |
| 104 | 104 | |
| 105 | 105 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 106 | 106 | if ( ! empty( $_POST['frm_style_setting']['post_title'] ) ) { |
| 107 | 107 | // The nonce check happens in FrmStylesController::save_style before this is called. |
| @@ -210,9 +210,9 @@ | ||
| 210 | 210 | $new_value = floatval( $value ); |
| 211 | 211 | } |
| 212 | 212 | }//end if |
| 213 | 213 | |
| 214 | - $new_color_values[] = $new_value; | |
| 214 | + $new_color_values[] = null === $new_value ? $value : $new_value; | |
| 215 | 215 | }//end foreach |
| 216 | 216 | |
| 217 | 217 | // add more 0s and 1 (if alpha position) if needed. |
| 218 | 218 | $missing_values = $length_of_color_codes - count( $new_color_values ); |