The plugin crashed my site
-
About half an hour ago, Jetpack notified me that it was unable to log into the test site I’m building into which I’ve installed Amazon Associates Link Builder. Trying to view the site or log in returned a 500 error. I checked the error log, and this is what I found:
[05-Dec-2017 02:44:09 UTC] PHP Fatal error: Cannot use object of type WP_Error as array in /home/[myrootfolder]/public_html/[websitesubfolder]/wp-content/plugins/amazon-associates-link-builder/ip2country/aalb_maxmind_db_manager.php on line 94 [05-Dec-2017 02:45:15 UTC] Maxmind_db_manager:get_db:::Forbidden
I then manually disabled the plugin and was able to log in normally.
I don’t know enough about PHP to understand what happened here. I had done nothing to the site since this morning. I’d like to continue using the plugin and would appreciate your help in debugging this problem.
This is the function line 94 is part of:
private function check_and_update_db() { try { $response = $this->get_db(); if ( $response ) { if ( $this->should_update_db( $response["response"] ) ) { $this->update_db( $response ); } update_option( AALB_GEOLITE_DB_EXPIRATION_TIME, strtotime( wp_remote_retrieve_header( $response["response"] , 'expires' ) ) ); } } catch ( Exception $e ) { error_log( "Error in maxmind_db_manager:should_update_db:::" . $e->getMessage() ); } }
Thanks,
David
- The topic ‘The plugin crashed my site’ is closed to new replies.