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/FrmInstallerSkin.php +22 -20 6.26 → trunk View file →
@@ -11,9 +11,9 @@
11 11 exit;
12 12 }
13 13
14 14 if ( ! class_exists( 'WP_Upgrader_Skin' ) ) {
15 - // this is to prevent a unit test from failing
15 + // This is to prevent a unit test from failing
16 16 return;
17 17 }
18 18
19 19 class FrmInstallerSkin extends WP_Upgrader_Skin {
@@ -37,9 +37,9 @@
37 37 * Set the upgrader result and store it as a property in the parent class.
38 38 *
39 39 * @since 3.04.02
40 40 *
41 - * @param object $result The result of the install process.
41 + * @param bool|string|WP_Error $result The result of the install process.
42 42 *
43 43 * @return void
44 44 */
45 45 public function set_result( $result ) {
@@ -69,28 +69,30 @@
69 69 *
70 70 * @param string|\WP_Error $errors The WP Error object of errors with the install process.
71 71 */
72 72 public function error( $errors ) {
73 - if ( ! empty( $errors ) ) {
74 - if ( ! is_string( $errors ) ) {
75 - $error = $errors->get_error_message();
76 - $message = $errors->get_error_data();
77 - $errors = $error . ' ' . $message;
78 - }
79 - echo json_encode(
80 - array(
81 - 'error' => $errors,
82 - 'message' => $errors,
83 - 'success' => false,
84 - )
85 - );
73 + if ( ! $errors ) {
74 + return;
75 + }
86 76
87 - if ( wp_doing_ajax() ) {
88 - wp_die();
89 - } else {
90 - die();
91 - }
77 + if ( ! is_string( $errors ) ) {
78 + $error = $errors->get_error_message();
79 + $message = $errors->get_error_data();
80 + $errors = $error . ' ' . $message;
92 81 }
82 + echo json_encode(
83 + array(
84 + 'error' => $errors,
85 + 'message' => $errors,
86 + 'success' => false,
87 + )
88 + );
89 +
90 + if ( ! wp_doing_ajax() ) {
91 + die();
92 + }
93 +
94 + wp_die();
93 95 }
94 96
95 97 /**
96 98 * Empty out the feedback method to prevent outputting HTML strings as the install