Skip to content

Commit

Permalink
Merge pull request #25 from bradt/error-handling
Browse files Browse the repository at this point in the history
Fatal error method `error` does not exist, fixes #20
  • Loading branch information
bradt committed Jul 26, 2013
2 parents ebd248e + 523663e commit b91373f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wp-migrate-db.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function backup_table( $table, $segment = 'none' ) {

$table_structure = $wpdb->get_results( "DESCRIBE $table" );
if ( ! $table_structure ) {
$this->error( __( 'Error getting table details', 'wp-migrate-db' ) . ": $table" );
$this->errors['describe'] = __( 'Error getting table details', 'wp-migrate-db' ) . ": $table";
return false;
}

Expand All @@ -491,14 +491,14 @@ function backup_table( $table, $segment = 'none' ) {
$create_table = $wpdb->get_results( "SHOW CREATE TABLE $table", ARRAY_N );
if ( false === $create_table ) {
$err_msg = sprintf( __( 'Error with SHOW CREATE TABLE for %s.', 'wp-migrate-db' ), $table );
$this->error( $err_msg );
$this->errors['show_create'] = $err_msg;
$this->stow( "#\n# $err_msg\n#\n" );
}
$this->stow( $create_table[0][1] . ' ;' );

if ( false === $table_structure ) {
$err_msg = sprintf( __( 'Error getting table structure of %s', 'wp-migrate-db' ), $table );
$this->error( $err_msg );
$this->errors['table_structure'] = $err_msg;
$this->stow( "#\n# $err_msg\n#\n" );
}

Expand Down

0 comments on commit b91373f

Please sign in to comment.