PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.8.9
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.8.9
4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 All 200 releases
← All changes | includes/Admin/HelpScoutMigration.php +7 -3 4.9.23.8.9 View file →
@@ -64,9 +64,9 @@
64 64 return false;
65 65 }
66 66 $initial_body = wp_remote_retrieve_body( $initial_response );
67 67 $initial_data = json_decode( $initial_body, true );
68 - $total_pages = isset( $initial_data['articles']['pages'] ) ? $initial_data['articles']['pages'] : 0;
68 + $total_pages = $initial_data['articles']['pages'];
69 69 update_option( 'betterdocs_helpscout_total_pages', $total_pages );
70 70 }
71 71
72 72 $current_page = get_option( 'betterdocs_helpscout_current_page', 1 );
@@ -157,11 +157,15 @@
157 157 delete_option( 'betterdocs_helpscout_total_pages' );
158 158 }
159 159 }
160 160 } catch ( \WP_Error $wp_error ) {
161 - return false;
161 + // Handle WP_Error exceptions
162 + //error_log('WP_Error occurred during migration: ' . $wp_error->get_error_message());
163 + return false; // Indicate failure to process the current item
162 164 } catch ( \Exception $e ) {
163 - return false;
165 + // Handle other exceptions
166 + //error_log('Error occurred during migration: ' . $e->getMessage());
167 + return false; // Indicate failure to process the current item
164 168 }
165 169
166 170 return true; // Indicate success
167 171 }