@@ 1917-1930 (lines=14) @@ | ||
1914 | * @param array $arguments_to_provide |
|
1915 | * @return string |
|
1916 | */ |
|
1917 | private function _verify_core_db( $wpdb_method, $arguments_to_provide ){ |
|
1918 | /** @type WPDB $wpdb */ |
|
1919 | global $wpdb; |
|
1920 | //ok remember that we've already attempted fixing the core db, in case the problem persists |
|
1921 | EEM_Base::$_db_verification_level = EEM_Base::db_verified_core; |
|
1922 | $error_message = sprintf( |
|
1923 | __( 'WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB', 'event_espresso' ), |
|
1924 | $wpdb->last_error, |
|
1925 | $wpdb_method, |
|
1926 | json_encode( $arguments_to_provide ) |
|
1927 | ); |
|
1928 | EE_System::instance()->initialize_db_if_no_migrations_required( false, true ); |
|
1929 | return $error_message; |
|
1930 | } |
|
1931 | ||
1932 | ||
1933 | ||
@@ 1941-1954 (lines=14) @@ | ||
1938 | * @param $arguments_to_provide |
|
1939 | * @return string |
|
1940 | */ |
|
1941 | private function _verify_addons_db( $wpdb_method, $arguments_to_provide ) { |
|
1942 | /** @type WPDB $wpdb */ |
|
1943 | global $wpdb; |
|
1944 | //ok remember that we've already attempted fixing the addons dbs, in case the problem persists |
|
1945 | EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons; |
|
1946 | $error_message = sprintf( |
|
1947 | __( 'WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB', 'event_espresso' ), |
|
1948 | $wpdb->last_error, |
|
1949 | $wpdb_method, |
|
1950 | json_encode( $arguments_to_provide ) |
|
1951 | ); |
|
1952 | EE_System::instance()->initialize_addons(); |
|
1953 | return $error_message; |
|
1954 | } |
|
1955 | ||
1956 | ||
1957 |