Skip to content

Commit

Permalink
Properly include database query error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
joepie91 committed May 27, 2013
1 parent bded804 commit 68964d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class.databaserecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ public function InsertIntoDatabase()
{
$classname = get_class($this);
$error = $database->errorInfo();
throw new DatabaseException("Database insertion query failed in object of type {$classname}. Error message: " . $error[3]);
throw new DatabaseException("Database insertion query failed in object of type {$classname}. Error message: " . $error[2]);
}
}
else
Expand Down

0 comments on commit 68964d3

Please sign in to comment.