PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 2.12.8
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v2.12.8
2.12.8 2.12.7 2.12.6 2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 All 98 releases
← All changes | inc/ai-form-builder/ai-auth.php +4 -1 2.12.7 → 2.12.8 View file →
@@ -93,9 +93,12 @@
93 93 wp_send_json_error( __( 'Nonce verification failed.', 'sureforms' ) );
94 94 }
95 95
96 96 // get body data.
97 - $body = json_decode( $request->get_body(), true );
97 + // get_body() is null for an empty request, and passing null to json_decode()
98 + // is deprecated on PHP 8.1+ - the notice lands in the response body and makes
99 + // the JSON unparseable wherever display_errors is on.
100 + $body = json_decode( Helper::get_string_value( $request->get_body() ), true );
98 101
99 102 if ( empty( $body ) ) {
100 103 wp_send_json_error( [ 'message' => __( 'Error processing Access Key.', 'sureforms' ) ] );
101 104 }