Browse files

Fix bug that causes dbDelta() to not create tables when the tables do…

… not exist.
  • Loading branch information...
1 parent 9febab3 commit 2ffcb1e7a18763dc51735e98da8cbfb05182f667 @markmont committed Aug 4, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 db.php
View
5 db.php
@@ -182,6 +182,11 @@ function print_error( $str = '' ) {
*/
function flush() {
$this->dbh->flush();
+ $this->last_result = array();
+ $this->col_info = null;
+ $this->last_query = null;
+ $this->rows_affected = $this->num_rows = 0;
+ $this->last_error = '';
}

Perhaps this should just be a call to parent::flush() since this class extends wpdb and none of these state variables are overridden in the subclass (wpdb_drivers). This would make it a little less fragile in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
/**

1 comment on commit 2ffcb1e

Please sign in to comment.