@@ 1995-2008 (lines=14) @@ | ||
1992 | * @param array $arguments_to_provide |
|
1993 | * @return string |
|
1994 | */ |
|
1995 | private function _verify_core_db( $wpdb_method, $arguments_to_provide ){ |
|
1996 | /** @type WPDB $wpdb */ |
|
1997 | global $wpdb; |
|
1998 | //ok remember that we've already attempted fixing the core db, in case the problem persists |
|
1999 | EEM_Base::$_db_verification_level = EEM_Base::db_verified_core; |
|
2000 | $error_message = sprintf( |
|
2001 | __( 'WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB', 'event_espresso' ), |
|
2002 | $wpdb->last_error, |
|
2003 | $wpdb_method, |
|
2004 | json_encode( $arguments_to_provide ) |
|
2005 | ); |
|
2006 | EE_System::instance()->initialize_db_if_no_migrations_required( false, true ); |
|
2007 | return $error_message; |
|
2008 | } |
|
2009 | ||
2010 | ||
2011 | ||
@@ 2019-2032 (lines=14) @@ | ||
2016 | * @param $arguments_to_provide |
|
2017 | * @return string |
|
2018 | */ |
|
2019 | private function _verify_addons_db( $wpdb_method, $arguments_to_provide ) { |
|
2020 | /** @type WPDB $wpdb */ |
|
2021 | global $wpdb; |
|
2022 | //ok remember that we've already attempted fixing the addons dbs, in case the problem persists |
|
2023 | EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons; |
|
2024 | $error_message = sprintf( |
|
2025 | __( 'WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB', 'event_espresso' ), |
|
2026 | $wpdb->last_error, |
|
2027 | $wpdb_method, |
|
2028 | json_encode( $arguments_to_provide ) |
|
2029 | ); |
|
2030 | EE_System::instance()->initialize_addons(); |
|
2031 | return $error_message; |
|
2032 | } |
|
2033 | ||
2034 | ||
2035 |