Fix outputting error messages in DB_PDO class correctly in some cases