PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.12
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.12
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 +20 -27 6.296.12 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 {
@@ -23,10 +23,8 @@
23 23 *
24 24 * @since 3.04.02
25 25 *
26 26 * @param object $upgrader The upgrader object (passed by reference).
27 - *
28 - * @return void
29 27 */
30 28 public function set_upgrader( &$upgrader ) {
31 29 if ( is_object( $upgrader ) ) {
32 30 $this->upgrader =& $upgrader;
@@ -38,10 +36,8 @@
38 36 *
39 37 * @since 3.04.02
40 38 *
41 39 * @param object $result The result of the install process.
42 - *
43 - * @return void
44 40 */
45 41 public function set_result( $result ) {
46 42 $this->result = $result;
47 43 }
@@ -66,33 +62,30 @@
66 62 * back to the Ajax script for processing.
67 63 *
68 64 * @since 3.04.02
69 65 *
70 - * @param string|\WP_Error $errors The WP Error object of errors with the install process.
66 + * @param object|string $errors The WP Error object of errors with the install process.
71 67 */
72 68 public function error( $errors ) {
73 - if ( ! $errors ) {
74 - return;
69 + if ( ! empty( $errors ) ) {
70 + if ( ! is_string( $errors ) ) {
71 + $error = $errors->get_error_message();
72 + $message = $errors->get_error_data();
73 + $errors = $error . ' ' . $message;
74 + }
75 + echo json_encode(
76 + array(
77 + 'error' => $errors,
78 + 'message' => $errors,
79 + 'success' => false,
80 + )
81 + );
82 + if ( wp_doing_ajax() ) {
83 + wp_die();
84 + } else {
85 + die();
86 + }
75 87 }
76 -
77 - if ( ! is_string( $errors ) ) {
78 - $error = $errors->get_error_message();
79 - $message = $errors->get_error_data();
80 - $errors = $error . ' ' . $message;
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();
95 88 }
96 89
97 90 /**
98 91 * Empty out the feedback method to prevent outputting HTML strings as the install