@@ 1947-1960 (lines=14) @@ | ||
1944 | * @param array $arguments_to_provide |
|
1945 | * @return string |
|
1946 | */ |
|
1947 | private function _verify_core_db( $wpdb_method, $arguments_to_provide ){ |
|
1948 | /** @type WPDB $wpdb */ |
|
1949 | global $wpdb; |
|
1950 | //ok remember that we've already attempted fixing the core db, in case the problem persists |
|
1951 | EEM_Base::$_db_verification_level = EEM_Base::db_verified_core; |
|
1952 | $error_message = sprintf( |
|
1953 | __( 'WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB', 'event_espresso' ), |
|
1954 | $wpdb->last_error, |
|
1955 | $wpdb_method, |
|
1956 | json_encode( $arguments_to_provide ) |
|
1957 | ); |
|
1958 | EE_System::instance()->initialize_db_if_no_migrations_required( false, true ); |
|
1959 | return $error_message; |
|
1960 | } |
|
1961 | ||
1962 | ||
1963 | ||
@@ 1971-1984 (lines=14) @@ | ||
1968 | * @param $arguments_to_provide |
|
1969 | * @return string |
|
1970 | */ |
|
1971 | private function _verify_addons_db( $wpdb_method, $arguments_to_provide ) { |
|
1972 | /** @type WPDB $wpdb */ |
|
1973 | global $wpdb; |
|
1974 | //ok remember that we've already attempted fixing the addons dbs, in case the problem persists |
|
1975 | EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons; |
|
1976 | $error_message = sprintf( |
|
1977 | __( 'WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB', 'event_espresso' ), |
|
1978 | $wpdb->last_error, |
|
1979 | $wpdb_method, |
|
1980 | json_encode( $arguments_to_provide ) |
|
1981 | ); |
|
1982 | EE_System::instance()->initialize_addons(); |
|
1983 | return $error_message; |
|
1984 | } |
|
1985 | ||
1986 | ||
1987 |