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