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 | classes/models/FrmFormState.php +5 -7 6.28 → trunk View file →
@@ -46,9 +46,9 @@
46 46 /**
47 47 * @return bool true if just initialized.
48 48 */
49 49 private static function maybe_initialize() {
50 - if ( empty( self::$instance ) ) {
50 + if ( ! self::$instance ) {
51 51 self::$instance = new self();
52 52 return true;
53 53 }
54 54 return false;
@@ -102,9 +102,9 @@
102 102 // This way we can also avoid duplicate state fields if Pro isn't up to date.
103 103 return;
104 104 }
105 105
106 - if ( empty( self::$instance ) && ! self::get_state_from_request() ) {
106 + if ( ! self::$instance && ! self::get_state_from_request() ) {
107 107 return;
108 108 }
109 109
110 110 $honeypot_field_id = self::$instance->get( 'honeypot_field_id', 0 );
@@ -168,10 +168,9 @@
168 168 if ( ! $this->state && ! self::get_state_from_request() ) {
169 169 return;
170 170 }
171 171
172 - $state_string = $this->get_state_string();
173 - echo '<input name="frm_state" type="hidden" value="' . esc_attr( $state_string ) . '" />';
172 + echo '<input name="frm_state" type="hidden" value="' . esc_attr( $this->get_state_string() ) . '" />';
174 173 }
175 174
176 175 /**
177 176 * @return string
@@ -180,11 +179,10 @@
180 179 if ( ! self::open_ssl_is_installed() ) {
181 180 return '';
182 181 }
183 182
184 - $secret = self::get_encryption_secret();
185 - $compressed_state = $this->compressed_state();
186 - $json_encoded = json_encode( $compressed_state );
183 + $secret = self::get_encryption_secret();
184 + $json_encoded = json_encode( $this->compressed_state() );
187 185 return openssl_encrypt( $json_encoded, 'AES-128-ECB', $secret );
188 186 }
189 187
190 188 /**